[Hibernate] experince in equals() and hashCode()

2003-09-09 Thread jiesheng zhang
import java.util.Random; public class A { // the object id, unsaved=0; private long id=0; private String value; public boolean equals(Object obj) { if (obj==this) { /*

Re: [Hibernate] self-referential table

2003-09-09 Thread Gavin King
Theres nothing particularly special about this. Just map it as you would any other association. The only problem is your -1, which breaks referential integrity of the whole table! just switch to using an SQL null. [EMAIL PROTECTED] wrote: Alright, so I've searched all over the web (this list d

[Hibernate] self-referential table

2003-09-09 Thread sw-list
Alright, so I've searched all over the web (this list doesn't appear to be archived either), so here I am ;-). I am finally getting into using Hibernate on a few projects and have run across something that I'm sure how it would be handled. I have one table that uses itself as a collection. Bas