A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Databases
»
Object Relational Mapping
Author
Hibernate mapping sort / order-by?
Vijay Kashyap
Ranch Hand
Joined: Jul 30, 2001
Posts: 74
posted
Aug 03, 2006 05:27:00
0
What should I use (sort or order-by) if I need to fetch a Set(one-to-many mapping)? How is sort different from order-by?
Thanks,
Vijay
pascal betz
Ranch Hand
Joined: Jun 19, 2001
Posts: 547
posted
Aug 03, 2006 06:35:00
0
from hibernate doc:
sort="unsorted|natural|comparatorClass"
order-by="column_name asc|desc"
order by is SQL order by, performed in DB
sort is in memory sorting based on natural order or trough a comparator class.
pascal
Vijay Kashyap
Ranch Hand
Joined: Jul 30, 2001
Posts: 74
posted
Aug 03, 2006 07:19:00
0
Oops...
Why didn't it strike my mind before
Thxs Pascal
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Hibernate mapping sort / order-by?
Similar Threads
DataStructure help
order of filter mapping
why arrayLIst does not sort the elements i add
Sorting
Mapping a qualified association with Hibernate
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter