Remap a field from DB

Posts   
 
    
mroogly
User
Posts: 1
Joined: 26-Jul-2005
# Posted on: 26-Jul-2005 06:54:48   

Hi all,

For legacy reasons, I can't re-do the database, but some fields are stored as char fields as '1', '0', 'Y', or 'N' for essentially a boolean field.

How do I remap a field to be boolean instead, and use all non '1'/'Y'/'y' values as false?

The only option I see is to use LLBLGen Pro to generate base classes, and descend, overriding the virtual properties. Is this the expected way to do such a thing? If so, the problem with this is you cannot change the datatype of a property.

As a side note, this is an Oracle 9i database.

Looking forward to your reply,

John

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 26-Jul-2005 09:30:58   

At the moment, please keep the original values. In the upgrade currently in development, type conversions will be added which allow you to map a given db type to a given .net type as long as there's a conversion routine available, for example CHAR(1) <-> bool

Frans Bouma | Lead developer LLBLGen Pro