lokesh pattajoshi wrote:HI every body i am using this query to get single value from data base but it is returning multiple values.I know setFirstResult and setMaxResult but except that can we use other things directly in hql.
select count(S.humanID) from Human S,Animal W WHERE S.humanID=W.animalID group by S.humanID order by count(S.humanID) desc limit 0,1
Paul Sturrock wrote:For my own curiosity Ben because I don't know Spring very well (and sorry Max for the slight hijack) if you use an HTTP provided DAO layer does Spring propagate transactions across it?
Prefer lazy fetching for associations.
Use eager fetching sparingly. Use proxies and lazy collections for most associations to classes that are not
likely to be completely held in the second-level cache. For associations to cached classes, where there is an
a extremely high probability of a cache hit, explicitly disable eager fetching using lazy="false". When an
join fetching is appropriate to a particular use case, use a query with a left join fetch.
Bhavesh Dak wrote:e.g. now I want to execute query, (Assuming all the required constructors available)
Will this work or how can I achieve this?
Bhavesh Dak wrote:One more thing I would Like to know is, Is it possible that we can manipulate java code inside query ?