can you use this (from the manual in 13.13. Tips & Tricks): IQuery q = s.CreateFilter( collection, "" ); // the trivial filter q.setMaxResults(PageSize); q.setFirstResult(PageSize * pageNumber); IList page = q.List();
Also look at(17.7. Multi Query) On Oct 8, 12:00 pm, felixg <[email protected]> wrote: > Hello, > I have an Article class and ArticlePicture class. Article holds a list > of pictures lazily loaded. In several cases I need to show the first > picture along with the article. For pictures count I use a formula. > But formula can only be set for a single property. Currently I use > ArticlePicture as a component inside Article and bring each component > property with a separate formula. Not ideal, but for component with 3 > properties manageable. Other idea I'm thinking about is a many-to-one > with a where clause, but I don't if/how can I add TOP clause (I can > set ORDER BY). > Is there a better solution? > In my searches I > foundhttp://onjava.com/pub/a/onjava/2005/08/03/hibernate.html?page=3 > which demonstrates Hibernate using formula for similar purposes, but > it uses and exact condition, while I need TOP. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
