You can't map a the 'columnC' in your hbm.xml file unless you also have a getter/setter for it in your 'X' class (*). I think the easiest way to solve this is at the database level. Eg. in your CREATE TABLE statement you should have something like:
Code:
CREATE TABLE X (
....
columnC int NOT NULL DEFAULT 8,
....
)
* There are possibilities to overcome this by implementing a custom PropertyAccessor and specifying this in the 'access' attribute of the property definition for columnC.
Code:
<property name="c" column="columnC" type="integer"
access="your.custom.PropertyAccessor" />
The use of a custom property accessor makes Hibernate call this instead of trying to call X.setC() and X.getC(). Check the Hibernate documentation for more info:
http://www.hibernate.org/hib_docs/v3/re ... n-property and
http://www.hibernate.org/hib_docs/v3/ap ... essor.html