-->
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: could not resolve property: idCharacterTable
PostPosted: Fri Oct 01, 2010 9:36 pm 
Newbie

Joined: Mon Sep 27, 2010 12:32 am
Posts: 5
Most of the posts I have read on this error refer to errors in not using aliases or thinking that the database table column name should be used rather than the mapped class property name.

Neither simple case is causing my error, as I understand it.

Error from trace:
could not resolve property: idCharacterTable

code snippet:
Code:
              //Create Select Clause HQL
              Query query = session.createQuery("select charac.idCharacterTable, charac.FirstName from CharacterTable charac");
              for(Iterator<CharacterTable> it=query.iterate();it.hasNext();){
                CharacterTable row = (CharacterTable) it.next();
                System.out.println("Name: " + row.getFirstName());
              }             


class code:
Code:
    private int idCharacterTable;   
    @Id
    @Column(name = "IDCHARACTERTABLE", unique = true, nullable = false)
    @GeneratedValue(strategy = GenerationType.AUTO)
   public int getIdCharacter() {
      return idCharacterTable;
   }
   public void setIdCharacter(int characterTableId) {
      this.idCharacterTable = characterTableId;
   }   


Since the class property, the annotation name attribute, and database table are named the same what can possibly be wrong here?


Top
 Profile  
 
 Post subject: Re: could not resolve property: idCharacterTable
PostPosted: Sun Oct 03, 2010 4:07 am 
Newbie

Joined: Mon Sep 27, 2010 12:32 am
Posts: 5
Am I doing something crazy wrong? Do people need more information?


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.