Cheers, Sathya Srinivasan - SCJP 1.2, SCWCD 1.2, SCMAD 1.0
Co-Author of Whizlabs SCMAD Certification Exam Simulator and SCMAD Exam Guide Book
Originally posted by Salomon Zalzman:
As far as pricing, the leading JDO vendors offer very attractive pricing models as compared to Hibernate as there is only a marginal cost for development licenses and no runtime charge. It is worth considering a JDO solution in your planning.
1. Not that flexible when it comes to mapping composite-ids (although you can do a lot). While this is not a fault of Hibernate as composite-ids are typically used in legacy systems, it can be a pain when attempting to map legacy tables.
2. Everything is an object. If you need only a portion of data (say, for a search), you would still have to retrieve the object. However, this is true for any ORM strategy.
3. In some cases, you will encounter the (n+1) select problem. That is, Hibernate will execute (n+1) queries for going through a list of records of size n. There are some mechanisms suggested by Hibernate that can be used to mitigate this risk.
quote:
--------------------------------------------------------------------------------
2. Everything is an object. If you need only a portion of data (say, for a search), you would still have to retrieve the object. However, this is true for any ORM strategy.
--------------------------------------------------------------------------------
wrong, HQL example: select person.name, person.height from com.Person, it doesn't return an instance of Person....
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
2. Everything is an object. If you need only a portion of data (say, for a search), you would still have to retrieve the object. However, this is true for any ORM strategy.
3. In some cases, you will encounter the (n+1) select problem. That is, Hibernate will execute (n+1) queries for going through a list of records of size n. There are some mechanisms suggested by Hibernate that can be used to mitigate this risk.
Originally posted by pascal betz:
my 2 cents:
NOTE: Does not work with collections (at least in Hibernate 2, i do not know if Hibernate 3 can handle them).
You can use [url=http://"http://www.hibernate.org/hib_docs/api/net/sf/hibernate/Criteria.html"]setFetchMode()[/url] , eager fetching in HQL, outer join settings to control the way collections are loaded.
pascal
"If idiots couldn�t get jobs for which they are unqualified, your workplace would be empty right now." - Scott Adams
I have a few little questions about the "select new" : How does it work ?!
does the object we want to instanciate have to be declared in an hbm.xml file ?
is it possible to do a "select distinct new ... " ?
Help... I don't find any info, even in Hibernate in Action...
Brice.
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|