Complex Type Model - Database

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
entwicklungsensis
Posts: 5
Joined: Tue 21 Aug 2018 09:47

Complex Type Model - Database

Post by entwicklungsensis » Tue 19 Nov 2019 07:53

Hello devart team,
when i define a Complex Type (e.g. "testtc ) with Properties string "one", string "two", string "three") and put it in an Entity (e.g. "TestEntity") with an Id Property and generate the model class the complex type is generated as a Class testtc in class Testentity.
After generating a migration with dotnet ef migrations add XXX and dotnet ef update database the oracle table "testenty" has the id, one, two, three columns. All right... thats nice! the properties of the complextyp are handled like normal columns in the entittest table.

But when i try to retrieve data from the table with linq i must type

Code: Select all

 var res = from myqry in testentity where myqry.testtc.one == "Hello" select xxxx...
and then getting an sql error that the table testtc does not exist!

I think the complextyp class should not be generated as a class testtc in testentity. It would be better if the properties of the complextypes were generated as properties in the entitytest class. apart from the error that occurs this is easier to handle when writing the linq.

can u tell me how to do that or correct it?

Thomas

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

Re: Complex Type Model - Database

Post by Shalex » Fri 22 Nov 2019 15:40

Could you please send us a test project with your model so that we can reproduce the error in our environment?

Post Reply