Hi,

Rogerio Tambellini wrote:
I'm using OJB connecting to MsSqlServer, but I'm not able to automatic increment a column into the column. I've added the following line into the repository.xml:

<sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
<attribute attribute-name="grabSize" attribute-value="1"/>
</sequence-manager>


please set grabSize > 1, because 1 will eliminate the advantage of this implementation (default was 20).
see http://db.apache.org/ojb/sequencemanager.html


Primary key column in the table is set to Auto-Increment, but it's still not working. When I store into the database, "store" operation always updates the 0 id line.

hmm, if your field-descriptor looks like

<field-descriptor
     name="articleId"
     column="ARTICLE_ID"
     jdbc-type="INTEGER"
     primarykey="true"
     autoincrement="true"
    />

all should work well.

regards,
Armin

Please, anyone has a implentation sample or a tutorial for OJB+MsSqlServer? Or just a hint?

Regards,
Rog�rio


--------------------------------------------------------------------- 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