Bugs item #606812, was opened at 2002-09-09 11:32
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=606812&group_id=22866
Category: JBossCMP
Group: v3.0 Rabbit Hole
>Status: Closed
Resolution: Works For Me
Priority: 5
Submitted By: Da C (dacu)
Assigned to: Dain Sundstrom (dsundstrom)
Summary: Table not removed from db on undeploy
Initial Comment:
Hi,
I think there is a bug when undeploying a CMP entity
bean that has relations.
JBoss v3.0.2
Windows 2000 Pro
JDK 1.3
Xdoclet for code generation
On a test project, I have two CMP entity beans: Product
and Order. I have defined a relation 1 to many between
Order and Product.
I used @jboss:relation tag with xdoclet, and the relation
has also a constraint (fk_constraint=true).
My Database is MS SQL Server 2000. Everything is
generated correcty, but on undeploy, the Order table is
not removed from Db.
for ProductBean, the relation is defined as
* @ejb:interface-method view-type="local"
* @ejb:relation
* name="product-order"
* role-name="many-products-in-one-order"
*
* @jboss:relation
* related-pk-field="id"
* fk-column="OrderId"
* fk-constraint="true"
*
*/
public abstract inventory.interfaces.OrderEntityLocal
getOrder();
for OrderBean, the relation is defined as
* @ejb:interface-method view-type="local"
* @ejb:relation
* name="product-order"
* role-name="one-order-has-many-products"
*
*/
public abstract Set getOrderProducts();
This bug doesn't happen when I don't have a relation.
Dan
----------------------------------------------------------------------
>Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-09-26 15:36
Message:
Logged In: YES
user_id=251431
I assume this is a SQL server bug. If I'm wrong, reopen the
bug.
----------------------------------------------------------------------
Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-09-17 18:37
Message:
Logged In: YES
user_id=251431
When you increase the log leve to DEBUG do you see a DROP
TABLE statement executed? Do you get a DEBUG message
"Could not drop table OrderEntity"?
If you execute DROP TABLE OrderEntity by hand will sql
server actually drop the table? My guess is sql server
won't drop the table because of a key constraint.
Anyway I think this is a SQL Server issue that there is
nothing we can do about.
----------------------------------------------------------------------
Comment By: Da C (dacu)
Date: 2002-09-17 18:09
Message:
Logged In: YES
user_id=608507
I've checked teh generated files jaws.xml and jbosscmp-
jdbc.xml. In both the remove-table attribute is set to true, so I
think it's a jboss issue.
----------------------------------------------------------------------
Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-09-16 15:05
Message:
Logged In: YES
user_id=251431
I assume that this is an XDoclet generation problem. If it
is not reopen this bug.
----------------------------------------------------------------------
Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-09-12 12:36
Message:
Logged In: YES
user_id=251431
Check the generated jbosscmp-jdbc.xml file. Does it have
remove-table set to true. The current release of XDoclet
incorrectly generates a jaws.xml file with remote-table set
to true and jaws.xml is no longer used. I suggest you
upgrade to XDoclet CVS head, or you write the
jbosscmp-jdbc.xml file by hand.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=606812&group_id=22866
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development