We have decided to not use O/R mappings for our application (i.e. OneToMany, OneToOne, ManyToOne, ManyToMany). Instead, we will just use the primary keys in our pojo's (i.e. accoundId instead of account). For any fetching, we will perform a regular SELECT statement. Also, we will manually create the database foreign key constraints.
I don't want to go into the details of the "why" but here are some:
1) MOST of our pojos will be lazy loaded hence we won't have much of a performance pick up from EAGER loading (left joins).
2) We have to serialize our pojo's which causes the infamous LazyInitializationException since serialization occurs outside of our session. We don't want to start a session or clone the object to resolve this issue.
3) Our UI layer is more geared to using pojo id's than the objects themselves.
Question:
Since we have eliminated the use of O/R mappings from our application, will we run into ANY serious hibernate issues?
|