Markus,

first of all, check Unknown primary key paragraph in the spec if you
didn't yet.
In a short:
- no cmp accessors for the unknown pk field;
- ejbCreate declares java.lang.Object as a return type
- ejbFindByPrimaryKey takes java.lang.Object as a parameter
- in ejb-jar.xml <prim-key-class>java.lang.Object</prim-key-class>
- no primkey-field in ejb-jar.xml

It seems to me that's all. I assume XDoclet generates correct
jbosscmp-jdbc.xml.
The SQL in your example is not safe. There meant to be some statement
that fetches next sequence value.

HTH,
alex

Wednesday, February 19, 2003, 8:19:03 PM, you wrote:

MG> Hi,

MG> i haven't managed to use the auto generating primary key of jboss 3.2.x
MG> and xdoclet 1.2b3!
MG> is there any example of _one_ simple ejb out there? i can't find
MG> anything on google!

MG> i included the following lines into my entity bean:
MG> ...
MG>  * @jboss.unknown-pk
MG>  *    class="java.lang.Integer"
MG>  *    column-name="id"
MG>  *    jdbc-type="INTEGER"
MG>  *    sql-type="INTEGER"
MG>  * @jboss.entity-command
MG>  *    name="pk-sql"
MG>  * @jboss.entity-command-attribute
MG>  *    name="pk-sql"
MG>  *    value="SELECT max(id)+1 FROM TestEntity"
MG> ...

MG> what to write in ejbCreate()? better: how to handle the creation
MG> process? any links, ideas suggestions? 

MG> thanx a lot
MG> markus




-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to