I encountered a problem with HSQLDB driver to Castor (the same code with MySQL works just fine).
The query: "SELECT s from " + SubscriberBinding.class.getName() + " s" + " WHERE s.emailNotifierInfo.enabled = $1"); Translates to the following SQL: SELECT subscribers.id,subscribers.opheliaObjectReference,message_subscriber_links.id,subscribers.root_subscription_folder_id,subscribers.email_notifier_info_id FROM subscribers LEFT OUTER JOIN message_subscriber_links ON (subscribers.id=message_subscriber_links.subscriber_id),email_notifier_info WHERE subscribers.email_notifier_info_id=email_notifier_info_0.id AND email_notifier_info_0.is_enabled = TRUE Now, the database complains (quite correctly) that the ID column does not exist: "java.sql.SQLException: Column not found: ID in statement". I guess it is because of the postfix "_0" added to table name in where clause (which should not be there, or at least when removed, HSQLDB accepts the statement). Any help or clues will be appreciated. Dawid P.S. I also include part of jdo-mapping file, so that you can see what it is defined like: > <class identity="id" > key-generator="IDENTITY" > name="org.opheliadev.orpheus.notification.databinding.SubscriberBinding"> > > <map-to table="subscribers" /> > > <field name="id" type="integer"> > <sql name="id" type="integer"/> > </field> > > <field name="opheliaSubscriberObject" type="string"> > <sql name="opheliaObjectReference" type="char" /> > </field> > > <field name="messageLinks" > type="org.opheliadev.orpheus.notification.databinding.MessageLinkBinding" > required="true" collection="arraylist"> > <sql many-key="subscriber_id" /> > </field> > > <field name="rootSubscriptionsFolder" > > type="org.opheliadev.orpheus.notification.databinding.SubscriptionsFolderBinding" > required="false"> > <sql name="root_subscription_folder_id" /> > </field> > > <field name="emailNotifierInfo" > > type="org.opheliadev.orpheus.notification.databinding.EmailNotifierBinding" > required="false"> > <sql name="email_notifier_info_id" /> > </field> > > </class> <!-- }}} --> > <class name="org.opheliadev.orpheus.notification.databinding.EmailNotifierBinding" > identity="id" key-generator="IDENTITY"> > <map-to table="email_notifier_info" /> > > <field name="id" type="integer"> > <sql name="id" type="integer" /> > </field> > > <field name="enabled" type="boolean"> > <sql name="is_enabled" type="bit" /> > </field> > > <field name="internalEmailAddress" type="string"> > <sql name="email" type="char" /> > </field> > > <field name="flags" type="integer"> > <sql name="flags" type="integer" /> > </field> > > <field name="digestIntervalMinutes" type="integer"> > <sql name="digest_interval_mins" type="integer" /> > </field> > > <field name="lastDigestTimestamp" type="java.sql.Timestamp"> > <sql name="last_digest_timestamp" type="timestamp" /> > </field> > > </class> _______________________ Dawid Weiss, http://www.cs.put.poznan.pl/dweiss Laboratory of Intelligent Decision Support Systems, Poznan UT, Poland ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
