Hi,
I made some important modifications to the way the entity class is
generated. The entity classes do not implement the Comparable interface
anymore. Instead, I have generated an EntityComparator on the side.
Now for associations inside an entity, they are now stored in a:
new TreeSet(<comparatorClass>) rather than in a simple TreeSet.
I had some regression problems implementing this but I think I fixed
them all. Just in case though, if you get a ClassCastException in the
Hibernate StoredSet class, keep in mind that it is probably because you
are trying to save a list, set or collection that is not a SortedSet.
This means that you should not do:
Collection collection = new HashSet();
product.setItems(collection);
but rather:
Collection collection = new TreeSet(ItemComparator);
product.setItems(collection);
You should almost never have to set the collection though. The proper
way to do this would be to iterate in the collection and to add them
individually or:
Collection collection;
...
product.getItems().clear();
product.getItems().addAll(collection);
If you have any questions let me know.
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mdarad-toolbox-devs mailing list
Mdarad-toolbox-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mdarad-toolbox-devs