By the way just so you all know I did get this sub query stuff to work. Turns out the problem was with the mapping of the table columns, repository and my code. Thanks for all your input. Sorry rookie mistake.
Roman -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Gene Sent: Tuesday, November 23, 2004 22:36 To: [EMAIL PROTECTED] Subject: Re: Sub query use with Criteria.PARENT_QUERY_PREFIX Stark, Roman <starkr <at> indiana.edu> writes: > > Hi All > > I am still struggling with the sub query feature and the use of the > subCrit.addEqualToField("productGroupId",Criteria.PARENT_QUERY _PREFIX > + "groupId"); > > Has anyone used this successfully and if so would you mind sharing > some of your experience and a code snippet please. > > I have been trying to use it on a query where the enclosing and sub > query both use the same table. Maybe that is a problem. Any > suggestions would be great. > > Thanks > Roman > Hi, Roman, Please turn on SQL logging switch to see what's the SQL output in spy.log file when you execute the Query. I have ever run successfully a Query with subQuery, which take the form like mainCrit.addIn("sampleField", subQuery). Certainly you can also take a try of addIn() method. Gene --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
