Associations for non key attributes???

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
HCRoman
Posts: 55
Joined: Wed 12 Aug 2009 05:47

Associations for non key attributes???

Post by HCRoman » Wed 30 Sep 2009 15:27

Hi devart team,

Oracle question:

is it possible to create associations between entities without using any or only some entity key columns???

I have imported some views from the database schema, so no constraints available.

Now i defined the id columns as entity key for each view.


V1
t1id entity key
fk1
fk2
...

V2
id entity key
t1id
...

V3
id entity key
...
fk1
fk2
...

Need associations one to many for

V1 t1id to t1id in V2

AND

V1 fk1, fk2 to V3 fk1, fk2

Than i tried to create associations between that views for master detail scenarios, but without success. Every time i am getting designer errors.
Not all entity keys specified and so on...

1 Properties referred by the Principal Role x must be exactly identical to the key of the EntityType y referred to by the Principal Role in the relationship constraint for Relationship x_y. Make sure all the key properties are specified in the Principal Role.



Only for complete entity key associations all works, but with the "trick"
of opening one time the "Mapping Details" Dialog with selecting the child table and pressing ok....... :?:


Is there any large example, that can explain how to "design" such associations?

Thanks

Roman

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

Post by AndreyR » Fri 02 Oct 2009 09:09

I am not aware of any workarounds in this case. Entity Key should be present at one end of the association.
This issue was discussed here:
http://social.msdn.microsoft.com/Forums ... 8689672e75

HCRoman
Posts: 55
Joined: Wed 12 Aug 2009 05:47

bad news not every time good news

Post by HCRoman » Fri 02 Oct 2009 13:04

Thanks,

this are bad news for me!!!!!!!

So only primary keys supported, that makes it impossible to build "logical key" associations.

This hurts our design like Jamies....

We have to do all work without conceptual model inside the application with queries...

But why I have the trouble with views and primary key associations?

The association is created, but without "refreshing" the Mapping Details an error remains in the designer???

Any idea?

Thanks

Roman

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

Post by AndreyR » Tue 06 Oct 2009 09:00

Could you please provide some steps to reproduce the error with designer?

Post Reply