Inserting

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
dekc
Posts: 2
Joined: Sat 13 Aug 2011 05:32

Inserting

Post by dekc » Sat 13 Aug 2011 05:45

Guys, I have a problem with inserts when adding a new entity to parent entity. The behavior can be demonstrated using the EMP/DEPT tables in Oracle's SCOTT demo schema.

Please refer to the thread I have posted on the RIA Services forum: http://forums.silverlight.net/p/236540/ ... 7401574489

As I note in a second post, the code behaves "correctly" when using SQL Server as the underlying database, but when Oracle is used, the ID generated upon inserting the new DEPT record is not being used/available when updating the EMP record.

Any ideas ?

dekc
Posts: 2
Joined: Sat 13 Aug 2011 05:32

Post by dekc » Sun 14 Aug 2011 06:26

OK - it was the omission of the StoreGeneratedPattern attribute. Obviously in Oracle (as opposed to SQLServer where it is automatically set on any Identity columns), you have to manual go set it to "Identity" for the column in question. But setting the StoreGeneratedPattern property for DEPT.DEPTNO via VS's Properties window will only add the atttribute to the EDMX's CSDL section. As you are probably aware, you still need to go and manually add the attribute in the SSDL section.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 16 Aug 2011 08:18

This issue was discussed at http://www.devart.com/forums/viewtopic.php?t=18620. As an alternative, you can use Entity Developer (right click on the project in Solution Explorer > Add > New Item> Devart Entity Model).

Post Reply