wvnoort wrote:
Using the context is more complicated than i thought. I am now strugling with the new records.
From the LLBLGen documentation:
This means that new entities aren't directly added to the Context's internal object cache, as for example Identity columns won't have a value for the PK field until they're saved and the transaction has been committed. When an entity is saved and the transaction is committed (if any), the entity is added to the Context's cache if the entity is new.
The situation at hand is: I need to create a new record. I want to put it into the context because i will need to update it later in the process.
The documentation suggests it will not be added to the context until i save it and commit the transaction. But i don't want to commit the transaction untill i am completely done. Is there an alternative?
New entities aren't added, as the PK can be sequenced which means all new entities have the same PK value, so the right one can't be found back.
I assume you want to use the Context because you have an 1:n relation and you start with the 'n' side, and thus have 1 entity to deal with for a lot of 'n's. ? What if you start from the other side?