-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: ICriteria does not return records
PostPosted: Mon Dec 21, 2009 11:04 am 
Newbie

Joined: Mon Dec 21, 2009 10:56 am
Posts: 1
Hi All,

to be quite honest, I'm very new with Hibernate.
I tried to create my own project according to some examples.

First I tried an example with
Code:

// Initialize
Configuration cfg = new Configuration();
cfg.Configure();

// Add class mappings to configuration
Assembly thisAssembly = typeof(Person).Assembly;
cfg.AddAssembly(thisAssembly);

// Create session factory from configuration object
m_SessionFactory = cfg.BuildSessionFactory();
IList<Person> m_Persons = new List<Person>();


This retrieves a list a 6 <Person>.
I found a different example (http://www.codeproject.com/KB/architect ... AMPLE_APPS).
This one uses the ICriteria interface but does not return any <Person>.
The ISession is created successfully in both examples.

Anyone able to me out here?


Top
 Profile  
 
 Post subject: Re: ICriteria does not return records
PostPosted: Wed Dec 23, 2009 2:54 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
There's no query in your code snippet. Can you post the query and the mapping of Person ?

_________________
--Wolfgang


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.