Association for dummies

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Bubblegum
Posts: 3
Joined: Thu 19 Feb 2009 11:52

Association for dummies

Post by Bubblegum » Thu 19 Feb 2009 12:07

I start the first time to work with an entity designer.
How can i make an simple association between this tables.

Adresse:
Field name:string
.
.
Field: CityId:int
==================
City
Field CityId:int
Field CityName:string

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

Post by AndreyR » Thu 19 Feb 2009 15:36

If there is an appropriate foreign key in your DB, the association should be generated automatically when both tables
are dropped on the designer surface.
Otherwise right-click on the designer surface, choose Add Association, set Parent (Addresse) and Child (City) class names
and the Association Properties (CityId in your example).
Judging from the example, you need the one-to-many cardinality. Press OK and the association should appear in the designer.

Bubblegum
Posts: 3
Joined: Thu 19 Feb 2009 11:52

Post by Bubblegum » Sat 21 Feb 2009 06:15

thanks, now it works.
my problem was the direction of the association. Now it works fine!

Post Reply