wocommunity / wolips

wolips
53 stars 53 forks source link

reverse engineering of relationships could be slightly smart #82

Open rkiddy opened 12 years ago

rkiddy commented 12 years ago

Suppose I have an entity named Shelf and an entity named Book. I often set up attribute names to be obvious. So, there is a pk column (an int) in the books table and a pk column (an int) in the shelfs table. I have a shelf_pk column in the books table and a shelfPk non-class attribute in the Book entity. I select the Book entity, click on the "Add Relationship" button and select the Shelf entity in the second pull-down. At this point the wizard fills out some things and it is almost completely wrong.

The wizard cannot figure out that I am probably creating a Book<---->>Shelf relationship? I have to set the ordinality by hand?

Then I have set the ordinality. The wizard cannot figure out that the foreign key in the Book entity on the relationship will be ... the shelfPk attribute? Again, I have to set this by hand.

Whenever I reverse-engineer tables and go to create relationships, the same things always occurs to me. Why am I doing this by hand again? The wizard UI could help me if I am creating a sensible relationship. For one thing, that would encourage people to create their relationships in a reasonable way. But the wizard has absolutely nothing to contribute here?