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 Guys, Given a database like below: Customer: Id (PK_Customer), Name, PhysicalAddressId, PostalAddressId Address: Id (PK_Address), Details FK_Customer_PhysicalAddress (Customer.Id - Address.Id) FK_Customer_PostalAddress (Customer.Id - Address.Id) By default, when drag these two tables into the designer, the result model is not buildable without renaming the collection name for each relationship. Both relationships are called Customers. What are the recommended conventions for this scenario? Would appreciate any thoughts/opinions on this :-) Thanks Joseph |
|
|
Just to add a bit more to this... Customer needs PhysicalAddress and PostalAddress But does Address needs CustomersWithPhysicalAddress and CustomersWithPostalAddress? |
|
|
This is by design. It's so that you have to rename them to (e.g.) CustomersAtPhysicalAddress and CustomersAtPostalAddress *before* you write a truckload of code that uses the name Customers and end up having to rename it all over the place. There are no specific conventions because the appropriate wording will depend on the semantics of the relationship. You're right, Address will need (and get) two collections, for the customers physically at that address and the customers who have it as their postal address. You can make these into private fields only if you don't want to surface this, but LightSpeed does require that both sides of the association be modelled. |
|