[hibernate-issues] [Hibernate-JIRA] Created: (ANN-802) @Formula annotation does not set value into bean property

Lincoln Baxter, III (JIRA) noreply at atlassian.com
Sat Feb 7 14:52:38 EST 2009


@Formula annotation does not set value into bean property
---------------------------------------------------------

                 Key: ANN-802
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-802
             Project: Hibernate Annotations
          Issue Type: Bug
    Affects Versions: 3.4.0.GA
         Environment: HSQLDB
14:46:43,879  INFO Version:15 - Hibernate Annotations 3.4.0.GA
14:46:43,908  INFO Environment:543 - Hibernate 3.3.0.SP1
14:46:43,926  INFO Environment:576 - hibernate.properties not found
14:46:43,934  INFO Environment:709 - Bytecode provider name : javassist
14:46:43,941  INFO Environment:627 - using JDK 1.4 java.sql.Timestamp handling
14:46:44,040  INFO Version:14 - Hibernate Commons Annotations 3.1.0.GA
            Reporter: Lincoln Baxter, III


The @Formula annotation never assigns the value of the query into the bean field. As you can see, it is being selected, but the field never receives the value. Everything else works fine.

    @Formula("id + 4")
    private int numWatchers;

A snippit of the generated SQL
select story0_.id as id9_1_, .......  story0_.id + 4 as formula0_1_, ......  where story0_.id=?

-- 
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