Page 1 of 1

Associations for non key attributes???

Posted: Wed 30 Sep 2009 15:27
by HCRoman
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

Posted: Fri 02 Oct 2009 09:09
by AndreyR
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

bad news not every time good news

Posted: Fri 02 Oct 2009 13:04
by HCRoman
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

Posted: Tue 06 Oct 2009 09:00
by AndreyR
Could you please provide some steps to reproduce the error with designer?