You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joose Vettenranta <jo...@iki.fi> on 2004/07/21 09:46:03 UTC

Re: ojb + forms = I can't get it to work [SOLVED]

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/ * joose@iki.fi * +358 44 561 0270 *


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org