I found the same problem that XDoclet would not use my name for the relation table. I solved this by writing my own ant task that replaces the name that is there with my own. In other words, my build file calls XDoclet, then calls my ant task which massages jbosscmp-jdbc.xml, then calls compile, etc. I also have this xdoclet code at the class level.

* @jboss:create-table create="false"
*
* @jboss:remove-table remove="false"

When I start up, it just gives me a message stating that the table is there:
15:30:44,012 INFO [ImageCollectionBean] Table 'keyword_imagecollection_links' already exists
15:30:44,042 INFO [PerformerBean] Table 'performer_imagecollection_links' already exists



Nir Oren wrote:

Hi...

I posted this to the JBoss forums, with no luck. Since this is quite a
serious problem, I was hoping someone here could help me:

I've got a class with the following xdoclet and java code:

/**@ejb:relation name="role-has-other-roles"
* role-name="role-contains"
* cascade-delete="no"
* @jboss:table-relation table-name="rolerolecontents"
* @jboss:relation related-pk-field="roleID" fk-column="parentrole"
*/
public abstract Collection getChildRoles();
public abstract void setChildRoles(Collection cr);


/** @ejb:relation name="role-has-other-roles"
* role-name="contents-of-role"
* cascade-delete="no"
* @jboss:table-relation table-name="rolerolecontents"
* @jboss:relation related-pk-field="roleID" fk-column="chilldrole"
*/
public abstract Collection getParentRoles();
public abstract void setParentRoles(Collection cr);

When I start up JBoss, it creates a table named
role_childroles_role_parentrole instead of the rolerolecontents name that
I really wanted it to have. Furthermore (and more importantly), unlike
other tables (which just give a warning), JBoss throws an exception if I
start it up after the table has already been created. Is there any way to
get around this problem? The table contains some very useful data, so
dropping it every time I kill the server is not an option. Note that the
exception means that JBoss refuses to deploy any MBeans that depend on the
EJB.

Thanks
Nir



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



--
Greg Turner, JBoss Authorized Consultant

Tiburon Enterprise Systems
http://www.tiburon-e-systems.com
Box 1171
Tiburon, CA 94920
415-927-2543





-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to