After 2 days of trying different options and stuff, I found the solution!

Solution is that connection has to be defined to have platform="Postgresql" and subprotocol="postgresql" and then I can use autoincrement="true" field thingie!

Here is the complete repository.xml for those strugling on same problem:

<descriptor-repository version="1.0" isolation-level="read-uncommitted">
<jdbc-connection-descriptor jcd-alias="<name in cocoon.xconf for this connection>" default-connection="true"
platform="PostgreSQL"
subprotocol="postgresql"
>
<sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImp l" />
</jdbc-connection-descriptor>


<class-descriptor class="net.vettenranta.category.bean.Category" table="categories">
<field-descriptor name="id"
jdbc-type="INTEGER"
primarykey="true"
default-fetch="true"
access="readonly"
indexed="true" autoincrement="true"
sequence-name="categories_id_seq"
column="id" />
<field-descriptor name="parent" column="parent" jdbc-type="INTEGER"/>
</class-descriptor>
</descriptor-repository>


- Joose

--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561 0270 *


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to