On 7/26/05, Marco Mistroni <[EMAIL PROTECTED]> wrote:
> Hello,
> I guess the answer is 'use another factory'
>
> I had a look at javadoc and noticed that sequencekeygenerator is only
> for oracle or postgresql
>
> Sorry 4 bothering
>
> Regards
> marco
>
> -----Original Message-----
> From: Marco Mistroni [mailto:[EMAIL PROTECTED]
> Sent: 26 July 2005 14:18
> To: [email protected]
> Subject: RE: [castor-user] [openEJB & castor}
>
> Hello all,
> Sorry for the partially off-topic question, but I guess the
> problem has happened also to normal castor user.
> I am using openejb1.0 to test entity bean.
> Openejb uses internally castor, so I have defined following mapping.xml
>
>
> <!DOCTYPE databases PUBLIC "-//EXOLAB/Castor Mapping DTD Version
> 1.0//EN"
> "http://castor.exolab.org/mapping.dtd">
> <mapping>
>
> <!-- Mapping for ProductGroup -->
> <class name="com.myapp.ejb.EntryCMP" identity="id"
> key-generator="SEQUENCE">
> <map-to table="entries"/>
>
> <field name="id"
> type="integer" direct="true">
> <sql name="id" type="integer"/>
> </field>
>
> <field name="description" type="java.lang.String">
> <sql name="description" type="varchar"/>
> </field>
>
> <field name="type"
> type="integer">
> <sql name="type" type="integer"/>
> </field>
>
> <field name="amount"
> type="double">
> <sql name="amount" type="double"/>
> </field>
>
> <field name="date"
> type="java.util.Date">
> <sql name="date" type="date"/>
> </field>
>
>
> </class>
>
>
>
> </mapping>
>
>
> and when I run my test code (which creates an Entity Bean) I have
> following exception
> 86 ) A fatal exception occurred:
> org.exolab.castor.mapping.MappingException: The key generator
> org.exolab.castor.jdo.drivers.SequenceKeyGenerator is not compatible
> with the persistence factory mysql.
>
>
> Any help on how to solve the problem?
Marco,
My apologies for missing this message when it first came through.
Unfortunately, not even MySQL 5 provides support for sequences. The
closest thing to it is the AUTO_INCREMENT type. This is why the
sequence key generator does not support MySQL.
Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
The Castor Project
http://www.castor.org/
Apache Geronimo
http://geronimo.apache.org/
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------