What was the syntax for your query? I presume that something about the query triggered the join code.
Wil "Philippe Hacquin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi again, > > sorry for the wrong tip. If it can be of any help, I've got such a query > working with MySQL 4.0.13 (an Integer as criteria, though, not a Date). > > Wil Hunt wrote: > > > Well, I know the parameter in the class is a date, as is the mapping in the > > repository_user.xml file. I'm also passing a Date into the bind method for > > inclusion. > > > > When I walk through the process of execution, I notice that it never creates > > the join with the summaries table. Apparently _summay._date is just being > > treated as a single string and is not being parsed. Where should this > > happen? > > > > Wil > > > > "Philippe Hacquin" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > >>Hi, > >> > >>maybe you bound the date parameter to a String object (even if this > >>string is formatted with a looks-like date format). If this is the case, > >>try to bind it with a Date instance. I think I met this problem before. > >> > >>HTH > >> > >>Wil Hunt wrote: > >> > >>>Hey all, > >>> > >>> I'm using OJBrc6 with MySQL and been faily happy with my results to > > > > this > > > >>>point. I'm running into a problem, however, in generating a proper OQL > >>>query that will get the data I need. Here's the relvant information > >>> > >>>(package names shortened for brevity) > >>> > >>>Class dm1.Task maps to table tasks > >>>Class dm1.Summary maps to table summaries > >>>tasks has a column fk_summary_id which is a foreign key into the > > > > summaries > > > >>>table. > >>>OJB knows about this and handles the reference to the dm1.Summary object > > > > in > > > >>>a field called _summary. > >>> > >>>dm1.Task { > >>> long _summaryId; // Actual foreign key variable from db. > >>> Summary _summary; // Reference to OJB object. > >>> blah blah > >>>} > >>> > >>>dm1.Summary { > >>> java.util.Date _date; > >>> blah blah; > >>>} > >>> > >>>I want to select all the tasks that have a summary date less than or > > > > equal > > > >>>to a given date.. > >>> > >>>Here's what my best guess to date is: > >>> > >>>SELECT tasks FROM dm1.Task WHERE _summary._date <= $1 > >>> > >>>I get an error table _summary not found back from the MySQL jdbc driver. > > > > So > > > >>>I'm guessing that something isn't mapping correctly. > >>> > >>>Basic queries have worked.. it's this "join" thats apparently causing > > > > the > > > >>>trouble. > >>> > >>>Thanks for any ideas. > >>> > >>>Wil --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
