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
|
Hello, I've been using your product for a new project over the last week and it is working well. I had an issue with the underscores in column names being removed but the nightly build has fixed this. I have an issue with mapping a two columns in a table to a public key of another table. e.g PersonCars.CarModel1 - Car.ID Bad example but it illistrates what I'm trying to achieve. I get the following: Error 3 The type 'Car' already contains a definition for 'PersonCars' ... I tried to fix this manually using a partial class, but there must something obvious I'm missing :) Any suggestions? I want to be able to join on Car where PersonCars has a match on either CarModel1 or CarModel2. Thanks, MD
|
|
|
You've got two associations between PersonCars and Car. Each results in a collection property at the Car end. LightSpeed's default guess for the name of the collection property is the plural of the type in the collection: in this case, PersonCars. But accepting this default guess results in two properties both named PersonCars. To fix this, you just need to give the two collections different names, reflecting their different meanings. Your example is obviously a bit artificial, so it's hard to know what might be appropriate: let's imagine that the collections relate to insured drivers and to ownership history. Each arrow has got text boxes showing the names of the properties, and you can edit these. So click on the first arrow, click on the text box that says "PersonCars," and change that to "InsuredDrivers". Then click on the second arrow, click on the text box that says "PersonCars," and change that to "PreviousOwners." (If the arrows overlap and it's hard to click on the text boxes, go to the Properties window and edit the Collection Name.) Save and recompile and you should be good to go. |
|