You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Hinnerk Feldwisch <di...@yahoo.de> on 2003/06/30 00:37:45 UTC

Re[2]: Too stupid... :) or: a Bug in SqlGeneratorDefaultImpl?

Hello Jakob,

Sunday, June 29, 2003, 4:54:41 PM, you wrote:

> hi hinnerk,

> could you please post the criteria you used ?

> jakob

But I don't understand your question - which criteria? I simply did a
retrieverReference("friends") (not exactly, I don't remember the exact
command at the moment) - but I didn't start a query/criteria.
Ok?


-- 
Best regards,
 Hinnerk                            mailto:dielisten@yahoo.de

> Hinnerk Feldwisch wrote:

>>Hello,
>>
>>after "hours" of debugging I found the problem with my m:n- mapping:
>>the cause of it was that I used the same name for the collection- name
>>and the (mysql- ) table.... very annoying, I should name all tables
>>like "table_friends" now! :/
>>
>>But perhabs the SQL- code which is generated by
>>SqlGeneratorDefaultImpl could be made more robust? It would be nice to
>>know that I'm the only one who had to find the sollution for this
>>problem :)
>>
>>Here is the crazy but  "faulty" code:
>>SELECT A0.password,A0.nickname,A0.gbId,A0.imageFileName, (...)
>>FROM USERS A0,friends INNER JOIN friends A1 ON A0.userId=A1.theUserId
>>INNER JOIN USERS A2 ON A1.friendId=A2.userId WHERE (A1.theUserId = 163 )
>>AND friendId = A0.userId
>>
>>And it should be:
>>SELECT A0.password,A0.nickname,A0.gbId,A0.imageFileName, (...)
>>FROM USERS A0,friends A1 WHERE (A1.theUserId = 163 ) AND
>>A1.friendId = A0.userId
>>
>>Thank you though for all your good work!,
>>Hinnerk
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>  
>>


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org