From: <leg...@at...> - 2003-12-17 01:43:09
|
Message: The following issue has been closed. Resolver: Gavin King Date: Tue, 16 Dec 2003 7:42 PM Fixed now. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-553 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-553 Summary: Type reflection is broken with property access="field" Type: Bug Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.1.1 Versions: 2.1.1 Assignee: Gavin King Reporter: Steve Bate Created: Sun, 14 Dec 2003 8:17 PM Updated: Tue, 16 Dec 2003 7:42 PM Description: If a property element with access="field" is used to bind a property to a private field in a class and the field does not have a bean property getter, the mapping fails. For example... <property name="foo" access="field"/> fails but <property name="foo" type="int" access="field"/> works. The problem is that the reflectedPropertyType method is hard-wired to use the BasicPropertyAccess regardless of the the specified property access method. Stack trace follows... net.sf.hibernate.PropertyNotFoundException: Could not find a getter for foo in class Foo at net.sf.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:182) at net.sf.hibernate.util.ReflectHelper.reflectedPropertyType(ReflectHelper.java:59) at net.sf.hibernate.mapping.SimpleValue.setTypeByReflection(SimpleValue.java:170) at net.sf.hibernate.cfg.Binder.createProperty(Binder.java:994) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:987) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:338) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1167) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:245) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:268) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:291) --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |