[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-5901) transient fields are persisted

Gail Badner (JIRA) noreply at atlassian.com
Wed May 4 02:02:07 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner updated HHH-5901:
-----------------------------

    Fix Version/s:     (was: 3.6.4)
                   4.0.0.Beta1
                   3.6.5

> 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.5, 4.0.0.Beta1
>
>         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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list