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
|
Find the code in question attached. The objective of the query is to obtain a person for a given user identifier. When I perform the following query:
This query generates an invalid sql statement. Notice the "ON" clause has a t2 alias which was never defined.
If I omit the mapping so the query looks as follows:
It generates the following invalid SQL (notice the t1.UserId):
The SQL I was looking for looks is the following:
I can only conclude that there is a problem with the way LightSpeed is generating the query. I'd appreciate any help to get the query to work. Thanks, Werner |
|
|
Is there a particular reason you are specifying the join as:
as opposed to
Given that the query is oriented around the Person and the join is defined on Person? The reason for the additional alias being in the mix is that the Person entity is considered (and internally given an alias) which is ending up in the query because the join has been explicitly declared on Party and not Person. This ends up with the confusion leading to the invalid query. I would consider the join from Person to User to be more correct since that is actually what you are dealing with.
|
|
|
Thanks mate. That sorted it. Werner |
|