Hi,

im using the auto-increment  function in an entity bean for the primary key.
On https://www.coredevelopers.net/library/jboss/cmp/keys.jsp i was told to use 
java.lang.object as the class for the PK. Here is my xdoclet code:

  | /**
  |  * @ejb.bean name="Kunde" display-name="Name for KundeBean"
  |  *           description="Description for KundeBean" jndi-name="ejb/Kunde"
  |  *           type="CMP" cmp-version="2.x" view-type="local"
  |  * 
  |  * @ejb.value-object match = "*" name = "Kunde" 
  |  * 
  |  * @ejb.util generate = "false"
  |  * 
  |  * @jboss.persistence table-name = "KUNDE" read-only = "false"   
create-table = 
  |  *                    "false" remove-table = "false" 
  |  * 
  |  * @jboss.entity-command name="postgresql-fetch-seq"
  |  *                       
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPostgreSQLCreateCommand"
  |  * 
  |  * @jboss.unknown-pk auto-increment = "true" column-name = "KUNDE_ID" 
jdbc-type =
  |  *                   "INTEGER" sql-type = "INTEGER" class = 
"java.lang.Integer" 
  |  *
  |  * @ejb.pk class = "java.lang.Object" generate = "false"
  |  *  
  |  * 
  |  */

i want to transfer the PK out of the container - because the
class java.lang.object (my PK) is not serializable, i got
always Exceptions.

Question: How can i get my PK outside the container and still using 
auto-increment for the PK ??

Hope, someody can help me - i scanned the newsgroups but i
found no answer for this.

Thanks for helping

Danny



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3869856#3869856

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3869856


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to