View Single Post
  #1 (permalink)  
Old 04-27-2008, 09:08 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,119
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
Icon4 HibernateQueryException

Quote:
2008-04-27 16:52:48,015 ERROR ExceptionResolver: could not resolve property: forum_id of: csns.model.bulletinboard.TopicModel [from csns.model.bulletinboard.TopicModel topic where topic.forum_id = ?]; nested exception is org.hibernate.QueryException: could not resolve property: forum_id of: csns.model.bulletinboard.TopicModel [from csns.model.bulletinboard.TopicModel topic where topic.forum_id = ?]
2008-04-27 16:52:48,015 ERROR ExceptionResolver: org.springframework.orm.hibernate3.HibernateQueryE xception: could not resolve property: forum_id of: csns.model.bulletinboard.TopicModel [from csns.model.bulletinboard.TopicModel topic where topic.forum_id = ?]; nested exception is org.hibernate.QueryException: could not resolve property: forum_id of: csns.model.bulletinboard.TopicModel [from csns.model.bulletinboard.TopicModel topic where topic.forum_id = ?]
Caused by: org.hibernate.QueryException: could not resolve property: forum_id of: csns.model.bulletinboard.TopicModel [from csns.model.bulletinboard.TopicModel topic where topic.forum_id = ?]
What does that mean...? I've been debugging for a while, and I've no clue what's wrong...

Here's what I have for the DaoImpl:

Code:
	public List getTopicByForumId(String forum_id) {
        String query = "from TopicModel topic where topic.forum_id = ?";
        return getHibernateTemplate().find(query, forum_id);
	}
most likely that there's something wrong with that...
topic_id is only defined by the Hibernate as the foreign key to the ForumModel's forum_id...

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote