Hello. I've been checking the forum for this problem but didn't found the same problem. Apologize in case it was already posted
This is the scenario: I have two classes like class A{ private boolean isMove public boolean isMove() { return isMove; } public void setMove(boolean isMove) { this.isMove = isMove; } } class B extends A ...
I persist B in a table using hibernate <class name="B" table="tabb"> <id name="id" column="id_plan" > <generator class="increment"/> </id>
... <property name="isMove" column="is_move" /> </class>
With this code, I get the following execution error: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
If I modify the name of the getter and setter method of A like that: public boolean getIsMove() { return isMove; } public void setIsMove(boolean isMove) { this.isMove = isMove; }
then everything works fine. It is an overhead, as I cannot use anymore automatic code generation with eclipse and I would have to refactor several methods. In the Tutorial, it is stated that Hibernate uses standard JavaBean naming conventions but isMove and setMove are standard. It is also stated that it is not mandatory to provide getters and setters, as hibernate can get access to private variables. What is then the problem?
Thanks in advance
|