Inserting

Inserting

Postby 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/584656.aspx/1?p=True&t=634487957401574489

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

Postby 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.
dekc
 
Posts: 2
Joined: Sat 13 Aug 2011 05:32

Postby 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).
Shalex
Devart Team
 
Posts: 7654
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle