1. How to automatically remove links from a Collection? forum.hibernate.orgThanks for your reply. The foreign key constraint exception is triggered because the collection group.users holds a reference to the primary key for User. Attempt to remove the User fails because that would leave a dangling reference in the collection to a user that no longer exists. The User mapping is shown below. Code: |
2. Could I remove Hibernate's own implementation of collection? forum.hibernate.orgHibernate Version: 3.1 Beta 3 The situaition is like this: I'm developing a 3 tier web applications project which the client side are running on the applet. Basically, Hibernate will replace our own implementation (java Set) with Hibernate's own PersistentSet when we fetch the objects. I have problems with all the persistent objects send to client side as my applet doesn't ... |
3. assert collection.remove(this) is fail forum.hibernate.orgclass A { @ManyToMany Set bes=...; } class B { @ManyToMany(mappedBy="bes") Collection aes=...; void addAssociation(A newbie){ // everything is clear. and works well .... } void removeAssociation(A associated){ assert aes.remove(associated); // works fine ... |