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'm pulling my hair out! I want to make a JOIN on two attributes EAN=SKU of two seperate tables: Table Product
Table ProductInfo
I have added a one-to-one relationship. How can I tell Lightspeed to use EAN and SKU to do the JOIN? Please help me with this simple issue! |
|
|
This isn't possible with an association. While you could potentially use a custom column name to deal with this, the FK field for an association must be of the same type as the entities identity type and must reference the foreign tables primary key (Id property). In cases where you want to just arbitrarily join two tables, just use Join criteria when constructing a query to handle this. Or if you want to expose some read only collections via property accessors on the entities you could handle this with some custom code like:
And then a corresponding Products property on ProductInfo.
|
|