Hi,
I’m using MyEclipse 4.1.0, and I have the following Hibernate XDoclet tags in one of my methods (in the class “Customer”):
/**
* Get the customer's orders
*
* @hibernate.set order-by="order_id"
* cascade="all-delete-orphan"
* @hibernate.collection-key
* column="customer_id"
* @hibernate.collection-one-to-many
* class="com.cite.paypaltest.Order"
*
* @return The set of orders for this customer
*/
public Set<Order> getOrders() {
return(orders);
}
It generates the following Customer.hbm.xml :
<set
role="orders"
lazy="false"
readonly="false"
cascade="all-delete-orphan"
sort="unsorted"
order-by="order_id"
>
<key
column="customer_id"
>
</key>
<one-to-many
class="com.cite.paypaltest.Order"
/>
</set>
An error is reported by the XML viewer, which says that “role” and “readonly” are not valid attributes for “set”, and that “name” is a required attribute. If I manually change “role” to “name” and eliminate “readonly” attribute, it works ok. Perhaps the problem is just an invalid DTD, but I’m not sure how to determine which DTD it’s using. I’m using “dynamically generated” xdoclet build, not the “xdoclet-build.xml” file.
Any help would be greatly appreciated. Thank you.
Gene