This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi I understand this might be a rookie question, but I'm just starting out with Lightspeed, so would really appreciate the help. Below is a simple DB model. Now, if I just model my entities according to this schema, with default mappings - I end up with: Hardware.DoorHardware.Door, while I would like to have Hardware.Door. The same applies to other such associations, also one to many i.e. House.HouseWindows.Windows (where Windows is a collection), instead of House.Windows. I would like to have tables for key relationships only (don't want to directly reference the tables between each other), how can I achieve this, without exposing those unnecesary redundant properties? Thanks a million! |
|
|
What you will want to create is a ThroughAssociation. Have a read through the documentation on how to set this up in the designer: http://www.mindscapehq.com/documentation/lightspeed/Creating-Domain-Models/Creating-Models-with-the-Visual-Designer#Toc297194930, I suspect what you will want to do is drag on your two primary tables, then create a ThroughAssociation between them and then specify the name of your underlying M2M join table in the Auto Through Entity field. You will then have House.Windows and Window.Houses properties available. You will still have a "HouseWindows" property on House since the joining entity is still a standard part of the association model that we represent but you can now ignore this and just work with the Windows collection directly.
|
|