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, I've installed a recent nightly (25/04) and now when I try to save the model I get the following error. Error Column CustomerId is mapped multiple times in entities Transaction's inheritance hierarchy. The Model: Customer -> Cash Sale -> Credit Sale -> etc... Cash Sale Inherits from Transaction with a discriminator of Transaction Type = 'CA' Credit Sale Inherits from Transaction with a discriminator of Transaction Type = 'CR' etc...
Is there away around this?
Kind Regards,
|
|
|
This indicates that you have two properties which are mapping to the same column. For example, you have a CustomerId property or a Customer association defined on more than one entity within the hierarchy. We added a designer error for this because duplicate mappings can cause problems at runtime (they confuse LightSpeed during the process of unpacking the columns into entity fields). However, it's possible we've been over-aggressive in raising this error. If this is an existing model, and you know from using the same model in previous versions of LightSpeed that the duplicate mapping *is* safe, then: (a) could you provide us with a copy of the .lsmodel file so we can understand what the duplicate mapping is and why it's safe, and remove the error for that scenario; (b) until we can fix the over-aggressive error, you can ignore it: LightSpeed should still generate the same code it used to, so if the old code worked then the new code should work as well. |
|
|
Hi Ivan, I've attached the a sample project with as model scenario. Hope this helps,
Kind regards,
Johan J v Rensburg |
|
|
Hello Johan, I'm having some problems downloading your repro -- not sure whether it's a file issue or a forums issue, but it always downloads as a 0-byte file. Could you try re-posting please? Thanks! |
|
|
Hi Ivan, I've attached the a sample project with as model scenario. Hope this helps,
Kind regards,
Johan J v Rensburg |
|
|
Thanks Johan. I've committed a fix which will be included in the 1 May nightly build -- please let us know if you still get the spurious error. |
|