3 ms·
Speed? I found Hibernate is great for CRUD. Like where you have dozens and dozens of domain objects that you want to persist, and you don't want to spend all y
by gerbilly 10y ago
Speed? I found Hibernate is great for CRUD.
Like where you have dozens and dozens of domain objects that you want to persist, and you don't want to spend all your time writing DAO code with SQL in in that is all the same but different.
Enterprise applications are rife with those.
For speed write some hand written SQL to handle those few cases (like batch imports maybe).
Also I found a handy rule:
Only create an association between entities when the entity makes no sense without the other.
For all other cases split them up and perhaps create aggregates by hand.
- mindcrime 10y agoThat jibes with my experience. We don't have tons of complicated associations, and do a lot of fairly straightforward CRUD operations. Maybe that's just the sweet spot for using Hibernate.