Hi all,
first of all I'd like to thank very much developers for the great Hibernate Tools. I'm trying it with Eclipse 3.3 and I've got a few questions and doubts related to reverse engineering (I start from an existent database):
1) can the generated DAO classes be placed in another package and not within the same package of the DTO classes?
2) why the DAO classes use the apache commons? Don't you think that this can be annoying since you have to include the jar in your project?
3) I've got a couple of simple tables:
Code:
create table Person(
personpk serial, // primary key
...
livingAddressPk references address(addresspk),
officeAddressPk references address(addresspk),
....
)
create table address(
addresspk serial, // primary key
street character varying(20),
.....
)
that means a person has two links to two address "instances", but no link from address to person is included in such instances. However, the Java code generated is:
Code:
public class Address {
private Set<Person> personsForBornaddresspk = new HashSet<Person>(0);
private Set<Person> personsForOfficeaddresspk = new HashSet<Person>(0);
private Set<Person> personsForLivingaddresspk = new HashSet<Person>(0);
....
}
why is the address class including links (multiple links) to Person instances? What if I don't want a reverse lookup? Does this costs to me when an address object is created (I mean, all the person must be associated to it...)?
4) the Home classes do not have a findall method, am I supposed to pass a null reference to the findByExample to get a loadAll semantic?
Thanks,
Luca