I’m trying to insert into my database table, which I set up with hibernate/Spring, and I’m getting the following error
The class ‘Layouts’ does not have the property ‘SubjectName’
The error is coming from the line
input type=”text” name=”SubjectName” size=”50″ value=”${fn:escapeXml(layout.SubjectName)}”
but I clearly have SubjectName defined in my ‘Layouts’ model file as a String, and its in my hbm.xml file as
property name=”SubjectName” type=”string” column=”SUBJECT”/
I also can’t select form the database, although it’s not giving an error. I feel like its coming from the same root problem
Since Hibernate relies so much on convention, I’d check to make sure that the property name is “subjectName”, not “SubjectName”.
Java’s coding conventions and Java Bean standards say that member names should start with a lower case character and provide getter/setter access. So private data member “foo” would have “getFoo” and “setFoo” methods.
Are you using Hibernate field or property access? I’d recommend field access.