Dears at the forum,
I fetch an entity from the db and add a new member to one of its depending collections. I try to save the entity using the following code:
Me.Adapter.KeepConnectionOpen = True
Me.Adapter.StartTransaction(IsolationLevel.ReadUncommitted, "BFBaseTransaction")
uow.AddForSave(Entity, Nothing, False, Recrusive)
As you see, I put the refetch parameter to false since I do the refetching on my own later on.
Looking at the SQL Profiler I see the following:
- An Insert statement is generated and run against the server for the new Entity (trying the statement in the QA shows that is does the insert)
- The complete graph is refetched
- A rollback is performed
- An update statement is performed for the Main entity (without a transaction)
- the last update goes through
Here are some of the details:
- I am using LLBLGen 2.0
- I check the state of the new entity I am just added to the main entity and
Entity.Fields.State = EntityState.New
I am a bit puzzeled by this behavior, I haven't seen it as of yet.
Could some one please make a suggestion as to how to proceed trying to find the error?
Best regards