Nikesh

Zoran

The fact that you are seeing this error, does not stop your project from compilation, but it does show that this is a problematic scenario from the perspective of OpenAccess. Here are the reasons why:

When you map more than one entity to the same table (flat inheritance), and you want to insert a record of certain derived type, values are inserted only in the columns mapped to that entity. For all other columns in the table the value is NULL.

It seems that you have non-nullable columns mapped to properties in some of your entities like TradeRepo . When records from other derived classes like TradeFx are inserted in the table, the NULL value will be inserted in the columns that are only mapped in TradeRepo. Those insert calls will fail as part of the columns mapped in TradeRepo are not nullable.

Generally, when flat inheritance is used, it is better to have columns that allow NULL in the database table to avoid such issues.

Regards,
Zoran
the Telerik team

Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.