Issue Details (XML | Word | Printable)

Key: HHH-1471
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Steve Ebersole
Reporter: Darran Lofthouse
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Hibernate Core

If the 'generated' attribute is set to 'insert' or 'always' on the property of a component it is ignored and the value is not read from the database.

Created: 09/Feb/06 10:34 AM   Updated: 19/May/08 05:19 PM
Component/s: core
Affects Version/s: 3.1.2
Fix Version/s: 3.2.2

Time Tracking:
Not Specified

File Attachments: 1. Text File patch.txt (3 kB)



 Description  « Hide
If the 'generated' attribute is set to 'insert' or 'always' on the property of a component it is ignored and the value is not read from the database.

Turning on debug logging shows no select statement being executed to retrieve the property. Using the generated attribute in the parent class works fine.

I have updated the existing ComponentTest test case so the Person class now has a username property that should be retrieved from the database with generated set to 'insert'.

 All   Comments   Work Log   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Steve Ebersole added a comment - 19/Jan/07 07:02 AM
trunk / 3.2

Shyamsunder added a comment - 19/May/08 05:19 PM
I have used hibernate 3.2.6 GA library. But the the following column is never updated in database. I have added this column in an Entity and in a component. A select query is issued after the entity is saved. But lastModified column has null value.

<property
            name="lastModified"
                    column="LAST_MODIFIED"
                update="false"
                insert="false"
                generated="always"
        >

Can some one post a working example? Also let me know if my hibernate mapping is valid.

Thanks
Shyam