-
1. Re: autokey generation (3.2.5 + hypersonic)
darranl May 2, 2005 1:27 PM (in response to gioele)I have never tried getting auto-increment to work with Hypersonic so can't comment on your specific problem.
However the return value from the ejbCreate method in a CMP entity bean should always be null, the container handles the rest. -
2. Re: autokey generation (3.2.5 + hypersonic)
gioele May 2, 2005 1:46 PM (in response to gioele)Now my ejbCreate end with return null, but the problems are still there...
Can someone post examples of working setups? -
3. Re: autokey generation (3.2.5 + hypersonic)
gioele May 14, 2005 9:12 AM (in response to gioele)The problem was that jbosscmp-jdbc.xml was not included in the correct jar file. Now the problem seems solved.
-
4. Re: autokey generation (3.2.5 + hypersonic)
qwidjibo May 18, 2005 9:30 AM (in response to gioele)Hi,
I'm trying to get auto increment to work with hypersonic db and have read many articles but there aren't any solid examples to follow.
I'm really new to JBoss and only using it for a uni coursework, so I'm on a tight schedule.
Most of the examples include dropping <cmp-field> from the ejb-jar.xml and using the <pk-unknown> element in the jbosscmp-jdbc.xml file.
Your example seems to have just added <auto-increment/> to the jbosscmp-jdbc.xml file, does this work? If so, I'd appreciate it if you could post a copy of the working xml files.
Cheers -
5. Re: autokey generation (3.2.5 + hypersonic)
gioele May 18, 2005 9:42 AM (in response to gioele)"qwidjibo" wrote:
Your example seems to have just added <auto-increment/> to the jbosscmp-jdbc.xml file, does this work? If so, I'd appreciate it if you could post a copy of the working xml files.
Yes, that's almost all I've to do to get auto pk generation.
I used these two xdoclet tags to the class comments:@jboss.persistence pk-constraint="false" @jboss.entity-command name="hsqldb-fetch-key"
and this one to the getter method of the pk@jboss.persistence auto-increment="true"
That's all. (remember to include all the deployment descriptors in the correct archives) -
6. Re: autokey generation (3.2.5 + hypersonic)
qwidjibo May 18, 2005 9:53 AM (in response to gioele)Cheers,
I'm not using Xdoclet at the moment, just trying to plough my way through and get to grips with everything before I start to take short cuts(I'm supposed to be evaluating EJB2.x persistence against hibernates persistence mechanisms).
I presume the tags add the necessary elements to the xml files, I'll have to check what alterations the tags cause.
Thanks again