| Author |
Message |
|
2007/06/02 12:45
|
|
|
ichbinvinh
Joined: 2007/06/02
Messages: 1
Offline
|
|
|
|
I hve tried to limit the returned results in ORM but unsuccessfully(= select top), I can only use Procedure to resolve this problem but this is not good because i must regenarate ORM layer each time i have a new Procedure. Can anyone give me a solution? thank you very much.
|
|
|
|
 |
| |
|
2007/06/04 10:18
|
|
|
Jick
Joined: 2005/04/29
Messages: 2880
Offline
|
|
|
|
Hello ichbinvinh,
You may try using Criteria. Please call: criteria.setMaxResults()
Best regards,
Jick
|
Visual Paradigm International Ltd.
http://www.visual-paradigm.com
Build Quality Applications Faster, Better and Cheaper |
|
|
|
 |
| |
|
2007/06/04 14:57
|
|
|
|
|
hello Jick,
i use ORM.net of olero not nHibernate for ASP.NET 2.0. I must do that
DataManager dm = new DataManager(Config.Dsn);
DataSet ds = dm.FillDataSet("SELECT TOP 5 * FROM Article ORDER BY Hits DESC", true);
// merge the data into DataManager
dm.PopulateObjectsFromDataSet(ds, "Article");
ArticleCollection ac = dm.GetArticleCollectionFromDataSet().FilterByLangCode(BasePage.CurrentLanguage);
DataList.DataSource = ac;
DataList.DataBind(); |
thanks for reply me
|
|
|
|
 |
| |
|
2008/02/25 16:55
|
|
|
Santm
Joined: 2008/02/18
Messages: 7
Offline
|
|
|
|
If ORM could generate hbm with 'formula' as property element in property tag it might not need criteria.setMaxResults()
|
|
|
|
 |
| |