In my OJB (using PersistenceBroker ) application auto-increment is not working.
I am using MySQL in which I have also used the auto-increment constraint for the
Primarykey ( bigint(20) )
For my database definition i have used the "SequenceManagerNativeImpl"
<sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl">
<attribute attribute-name="autoNaming" attribute-value="true"/>
</sequence-manager>
also in the mapping file i have
<class-descriptor class="com.haystack.emailmarketingchoice.member.MemberVO"
table="tblMember">
<field-descriptor id="1" name="memberId" column="member_id" jdbc-type="BIGINT"
primarykey="true" autoincrement="true" access="readonly" />
------------
------------
</class-descriptor>
i have also tried without the --> access="readonly"
but it generates a new 20 digit "auto-increment" number only for the first insert,
for the subsequent inserts it generates the same number and a Duplicate Entry error
arises.
I have also tried the following sequence managers
SequenceManagerMySQLImpl
SequenceManagerSeqHiLoImpl
with and without these attributes
<attribute attribute-name="grabSize" attribute-value="5" />
<attribute attribute-name="globalSequenceId" attribute-value="true"/>
<attribute attribute-name="globalSequenceStart" attribute-value="10000"/>
But ALL Failed.
Have any one of you tried this. Please let me know.
Thanks in advance for your interest in my problem.
Regards,
Arjun.