On Friday 05 July 2002 12:49 pm, you wrote:
> Neal Sanche wrote:
> > I've set my entity beans to remove the database table when
> > undeployed because I'm testing and making all kinds of changes.
> > One thing I noticed is that the database table for the Many to
> > Many relation didn't get deleted on undeploy.  But I discovered
> > my error, and got that working too.
>
> Did you set remove-table in the defaults section?  The
> relation-table-mapping does not look to either entity (it would be
> difficult to choose which one) for default values, it only looks to
> the defaults section.  If it is not inheriting the value from the
> defaults section, please post a bug report at sourceforge.

Well, no, it's not looking to the defaults section, I had to add a 
@jboss:relation-table statement to my xdcolet tags in the relation 
getter method. That worked fine. It isn't documented in xdoclet 
1.1.2, but I think I might be using a modified xdoclet .jar file from 
the jboss distribution. I was able to specify something like the 
following for my tags:

/**
  @ejb:interface-method view-type="local"
  @ejb:relation name="coi-entry"
      role-name="many-entries-have-many-cois"
  @jboss:auto-key-fields
  @jboss:relation-table
         table-name="PLAYGROUND_ENTRYCOIS"
         remove-table="true"
         create-table="true"
         row-locking="true"
**/

And in the  target class, I added:

/**
  @ejb:interface-method view-type="local"
  @ejb:relation
            name="coi-entry"
            role-name="many-cois-havve-many-entries"
  @jboss:auto-key-fields
**/

That works fine for me. The default tablename was causing problems 
with Oracle... it would create the table and then I was unable to 
remove it with my favourite SQL tool. Maybe that was what the problem 
was all along.

I don't think it's worth a bug report, since I did get it working.

-Neal


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Bringing you mounds of caffeinated joy.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to