ORMOutOfSyncException

Posts   
 
    
chrisa23
User
Posts: 12
Joined: 04-Apr-2006
# Posted on: 27-Jun-2006 16:41:56   

Hoping someone can help clue me in where I might be going wrong... using Adapter, if its not obvious from the Adapter specific error...

Only when I create a new entity and display it, do I get this exception... I am creating a default new entity, inserting it and returning the Id, then fetching it just like I do entities that are already in the DB to be displayed and edited...

Seems to only be two fields... I have tried adjusting things like allowing nulls, db defaults, etc, but nothing seems to work... And its only with a just created entity...

Anyone have a clue why I might be getting this error or where to look to solve it?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 27-Jun-2006 17:04:06   

You've to initialize fields of an entity before you can read the fields, either with data from the db or with data you insert yourself. Otherwise you're reading values from an entity which don't exist, hence the outofsync exception: it's out of sync with its real instance in the db (with a new entity, that thus doesn't exist yet).

Frans Bouma | Lead developer LLBLGen Pro