Hi,

MySQL does not support database based key generation
(MySQL supports only Identity columns).
You have to use another sequence manager implementation.
http://db.apache.org/ojb/sequencemanager.html

regards,
Armin

----- Original Message -----
From: "Mykola Ostapchuk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 19, 2003 1:05 AM
Subject: Database sequences based implementation problem


> Hello,
>
> I'm trying to use Database sequences based implementation and receive
an
> exception below.
> I'm using MySql. Primary field "ST_id" has "Autoincrement" option
checked.
>
> repository.xml:
>
> Sequence Manager:
>
> <sequence-manager
>
className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImp
l">
>     <attribute attribute-name="autoNaming" attribute-value="true"/>
> </sequence-manager>
>
> Primary field:
> <field-descriptor id="1" name="stateId" column="ST_id"
jdbc-type="BIGINT"
> primarykey="true" autoincrement="true"/>
>
>
> Exception:
>
>
> : org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
Could
> not init Identity for given object
>  class com.iprs.core.countries.StatesVO: Could not get key value:
> Could not grab next id, failed with
> This feature is not supported by this implementation
> Creation of new sequence failed with
> This feature is not supported by this implementation
> : This feature is not supported by this implementation
> An exception has been caused by:
> java.lang.UnsupportedOperationException: This feature is not supported
by
> this implementation
>         at
>
org.apache.ojb.broker.platforms.PlatformDefaultImpl.createSequenceQuery(
Unkn
> own Source)
>         at
>
org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl.createSeq
uenc
> e(Unknown Source)
>         at
>
org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl.getUnique
Long
> (Unknown Source)
>         at
>
org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueVal
ue(U
> nknown Source)
>
>
> Any suggestions what's wrong?
>
>
> Regards,
> Mykola
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to