Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Default value for bit field
 

Pages: 1
LLBLGen Pro Runtime Framework
Default value for bit field
Page:1/1 

  Print all messages in this thread  
Poster Message
Pablo
User



Location:
Sneek
Joined on:
21-Mar-2005 01:17:52
Posted:
81 posts
# Posted on: 14-Jan-2010 23:17:09.  
Hello,

I have defined a bit field in the database, with a default value of 1.
When I create the entity, and check the value of this field, it says 'false' ....
Am I doing something wrong, or is this supposed to be like this?

llblgen v 2.6, sql2k8 express.

Any help would be appreciated,

Paul
  Top
MTrinder
User



Location:
London by day, Milton Keynes by night.
Joined on:
08-Oct-2008 17:55:47
Posted:
1461 posts
# Posted on: 15-Jan-2010 00:03:05.  
This is the expected behavior - default values are not picked up from the database. If you search the forums you will find several discussions about why this is the case.

If you need a default value set your best bet is to create a Manager/Factory class that correctly creates a new entity with the default values all ready set, and ensure that this is used everywhere.

Matt


  Top
Pablo
User



Location:
Sneek
Joined on:
21-Mar-2005 01:17:52
Posted:
81 posts
# Posted on: 15-Jan-2010 13:41:57.  
Matt,
ok thats clear ... I'll set a default value in code.
Thanks,
Paul
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.