Howdy,

I'm relatively new to castor and in the process of developing a
servlet-based application with 0.9.3 and Tomcat 4.0.

I'm experiencing a strange behavior with my mapping.xml file.

This works fine:

<mapping>
  <class name="com.quigley.dashboard.Account" identity="id">
    <map-to table="ACCOUNT" />
    <field name="id" type="string">
      <sql name="ID" type="char" />
    </field>
    <field name="password" type="string">
      <sql name="PASSWORD" type="char" />
    </field>
    <field name="name" type="string">
      <sql name="NAME" type="char" />
    </field>
    <field name="url" type="string">
      <sql name="URL" type="char" />
    </field>
    <field name="email" type="string">
      <sql name="EMAIL" type="char" />
    </field>
  </class>
</mapping>

But this:

<mapping>
  <class name="com.quigley.dashboard.Account" identity="id"
         key-generator="IDENTITY">
  ...
</mapping>

Results in the exception:

org.exolab.castor.jdo.QueryException: Could not find mapping for class
com.quigley.dashboard.Account

...to be thrown!

It's almost as if castor isn't dealing with the mapping.xml correctly when
I add the "key-generator" attribute to my <class> element.

I'm making excellent progress with castor, otherwise! I've been through
the mailing list archive (search would be wonderful!), but I've been
unable to find anything which appeared relevant.

I'd love to be able to call db.create(new Account()) without having to
generate a PK myself!

Any insight into my failure would be appreciated!

Thanks,
Michael

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to