Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> LLBLGen v2.6 Self-Servicing with SQL Server - Default Values
 

Pages: 1
LLBLGen Pro Runtime Framework
LLBLGen v2.6 Self-Servicing with SQL Server - Default Values
Page:1/1 

  Print all messages in this thread  
Poster Message
mshe
User



Location:
Markham, Canada
Joined on:
02-Feb-2006 23:31:34
Posted:
167 posts
# Posted on: 11-Aug-2009 19:22:08.  
Hello,

I'm having an issue with default values in an entity - the entity is not being saved correctly to the database.

I'm declaring an object as follows:        

Dim MyEntityObject As New MyEntity(Now.Year, Now.Month, Now.Day, Now.Hour, Key)

Assuming MyEntity does not exist in the database, it will return a new instance - this is working correctly.

Now if I go (assuming the entity did not existing in the database)

MyEntityObject.SomeValue = 1
MyEntityObject.Save

This will throw an exception. I inspected the SQL code, the fields, like Year, Month, Day, Year are not being sent to the database. The entity believes them to be defaults and not "new" / "dirty" fields.

I need to reassign all the fields for the entity to be saved.

My question is: if an entity is marked as new, why arne't all the fields being sent to the database?

Thanks.
  Top
MTrinder
User



Location:
London by day, Milton Keynes by night.
Joined on:
08-Oct-2008 17:55:47
Posted:
1461 posts
# Posted on: 11-Aug-2009 22:49:20.  
Hi

Please can you give us some more details - see http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7717

Thanks

Matt


  Top
Pages: 1  


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

Version: 2.1.12172008 Final.