Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Multiply "order by" tags
Hi, It sounds like you can have only one "particular order" in a service entity service. What do you do if you need a second ordering? Do I need to create a second entity for the same table? Maybe a custom sql querie is a better solution....MErci!
The single order by in service.xml is the default one.
The persistence layer allows for passing in custom order by comparator instances, so you all need to do is add a method to your XxxLocalServiceImpl to expose a method that passes a different comparator to the XxxPersistenceImpl class.
The persistence layer allows for passing in custom order by comparator instances, so you all need to do is add a method to your XxxLocalServiceImpl to expose a method that passes a different comparator to the XxxPersistenceImpl class.
That is smart. Thanks!!!!!!
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™