Me again,

Fortunately, there is a way for the container to
dynamically generate a key, using the <unknown-pk>
element in the "jbosscmp-jdbc.xml" file.

After scanning the new cmp docs for 3.2 I was having a
bit of trouble figuring out where to place the
element. I found the answer in the DTD, though.  It
gets nested into <defaults> and <entity> elements.

I found the answer to my other question, also--if you
want the table to go away when you undeploy, set the
<remove-table> element to "true" for that entity and
leave <create-table> as "true" (its default setting). 
All of this is declared in the "jbosscmp-jdbc.xml"
file, which must be placed in the META-INF directory
with the "ejb-jar.xml" file.

So it would look like this (I think):

  <entity>
    <ejb-name>UserEJB</ejb-name>
    <table-name>user</table-name>
    <remove-table>true</remove-table>
                        
    <unknown-pk>
     
<unknown-pk-class>java.lang.Integer</unknown-pk-class>
      <column-name>USER_ID</column-name>
      <jdbc-type>INTEGER</jdbc-type>
      <sql-type>INTEGER</sql-type>
      <auto-increment/>
    </unknown-pk>
  </entity>

Thanks for your help regardless, Marco :)

--
Jim


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to