When I add a new entity object into Oracle, the record is created. However I noticed the entity is not refreshed with the new ID generated on the server.
Code: Select all
using (MyEf4Entities ctx = new MyEf4Entities())
{
var person = new Person
{
Name = "MyName",
};
ctx.Persons.AddObject(person);
ctx.SaveChanges();
}
After the SaveChanges(), PersonIs is still 0, the state is Unmodified and the entitykey is set to temporary is false.
Of course, PersonId is the key and its property StoreGeneratedPattern is set to true.
A trigger exist:
Code: Select all
CREATE OR REPLACE TRIGGER "PHX5"."TRG_BEFORE_INSERT_PERSON"
before insert on person
for each row
begin
select mspak.seq_personid.nextval into :new.personid from dual;
end;
We work with dotConnect for Oracle Pro, 5.70.152.0, Oracle 11g
Thanks.