Only one StoreGeneratedPattern="Computed" column possible?

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
asaake
Posts: 17
Joined: Tue 25 Mar 2008 16:51

Only one StoreGeneratedPattern="Computed" column possible?

Post by asaake » Sat 03 Jul 2010 14:58

My entities have to columns which derive from Oracle pseudocolumns:

- Rowid
- Rowscn

Both are defined as StoreGeneratedPattern="Computed".

DbMonitor shows the following sql:

Code: Select all

declare
  updatedRowid ROWID;
begin
update MW
   set MWST_TEXT = :p0, MWST_SATZ = :p1, MWST_USER = :p2, MWST_AEND = :p3
 where (((MWST_NO = :p4) and (MWST_AB = :p5)) and (ORA_ROWSCN = :p6))
returning ROWID into updatedRowid;
open :outParameter for select "ROWID", ORA_ROWSCN from MW where ROWID = updatedRowid;
end;
Seems to me that only one such column is possible, because of returning only the first ":outParameter".

Is this the intended behaviour?

asaake
Posts: 17
Joined: Tue 25 Mar 2008 16:51

Post by asaake » Sat 03 Jul 2010 20:25

Ok. Seems there are two misunderstandings of mine:

1. I didn't realize that's a cursor returned by the last select, not a single result.

2. ora_rowscn doesn't change until commit. Before commit it returns null.

Probably ora_rowscn cannot be used for concurrency checks with Entity Framework.

I cancel my question.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 06 Jul 2010 12:44

You are correct. This question was discussed here.

Post Reply