]
Strong Liu commented on HHH-5901:
---------------------------------
mapping?
transient fields are persisted
------------------------------
Key: HHH-5901
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5901
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.6.0
Environment: JBoss 6.0.0.Final using Hypersonic
Reporter: Frank Griffin
Fix For: 3.6.3
Attachments: DBUtDVDTitleEntityBean.java
This is virtually identical to ANN-132, which was marked as FIXED in 3.1.
The attached entity bean (DBUtDVDTitleEntityBean) has a "private transient Object
oDisks" field. The field is not annotated as @Transient, and the orm.xml does not
have a <transient> (or any other) element for the field.
According to spec, the "transient" java attribute should exempt it from
persistence. However, if you deploy the EAR containing this Entity Bean, the error
{noformat}
Caused by: org.hibernate.MappingException: property mapping has wrong number of columns:
org.profsoftsvcs.dbutils.DVD.DBUtDVDTitleEntityBean.disks type: object
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:464)
[:3.6.0.Final]
at org.hibernate.mapping.RootClass.validate(RootClass.java:235) [:3.6.0.Final]
at org.hibernate.cfg.Configuration.validate(Configuration.java:1332)
[:3.6.0.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1835)
[:3.6.0.Final]
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:902)
[:3.6.0.Final]
{noformat}
results. If I change the type "Object" to "Serializable", the error
does not occur. However, the fact that "Object" is not Serializable
shouldn't matter if the field isn't being persisted.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: