[
https://jira.jboss.org/jira/browse/JBIDE-6051?page=com.atlassian.jira.plu...
]
Dmitry Geraskov commented on JBIDE-6051:
----------------------------------------
I meant we could have:
public interface NamedElement{
String getName();
void setName(String name);
}
public abstract class AbstractNamedElement implements NamedElement{
private String name;
}
In this case I'll check if there methods get/setName(). If they are not here I'll
set access type to "field" otherwithe I'll leave default
one("property"). The question was: should I check MyParent for the get/setName()
methods. The example shows that parent interface prove us that actual entity class will
have get/set methods. I know that example is very specific and so check only
AbstractNamedElement for the get/set method.
Set default-access type to "field" to prevent
org.hibernate.PropertyNotFoundExcetion
------------------------------------------------------------------------------------
Key: JBIDE-6051
URL:
https://jira.jboss.org/jira/browse/JBIDE-6051
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Hibernate
Affects Versions: 3.1.0.CR2
Reporter: Dmitry Geraskov
Assignee: Dmitry Geraskov
Fix For: 3.1.1, 3.2.next
When there is no getter or setter in the class an exception occurs:
org.hibernate.PropertyNotFoundException: Could not find a setter for property id in class
...
To prevent this use defauilt-acess="field" in the mapping in New Hibernate
Mapping file wizard.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira