Foren

How to make a custom query in Liferay 6.1 that returns Liferay objects ?

thumbnail
Alexandre FILLATRE, geändert vor 11 Jahren.

How to make a custom query in Liferay 6.1 that returns Liferay objects ?

Junior Member Beiträge: 80 Beitrittsdatum: 02.12.10 Neueste Beiträge
Hi,

I'd like to create a custom query which returns the last 5 blog entries a user has access to, regardless the blogs' group. In order to do that, I created a finder in my sdk project, which returns a list of BlogEntry. As expected, I get a "MappingException" because the entity was unable to be found, which is normal because it is located in a different classloader (another hbm.xml file).

I think returning ids instead of raw objects may work here, but I was wondering what would be the best/nicer way to achieve this. Any ideas ?

Thanks
Regards,
Alexandre FILLATRE