Bug in DataContext?
Posted: Wed 23 Mar 2016 10:42
Hello,
I have the following code
Now I have the following situation. In the first case UserName and UserID are saved as expected. In the second case UserName is saved, but the UserID is zero.
Is it a bug, or am I doing something wrong?
Thx!
I have the following code
Code: Select all
MyMappedEntity := TSomeMappedEntity.Create;
MyMappedEntity.UserName := 'Barack';
MyMappedEntity.UserID := 123456;
Code: Select all
(1) MyMappedEntity.Attach(FEntityContext);
(2) FEntityContext.Attach(MyMappedEntity);
MyMappedEntity.Save;
Thx!