Hello,
I am using Hibernate 3.3 with annotation support. In my entity class, I marked a field as
transient using
Code:
private transient Double storeDistance
.
I expected this field to be non persistent and its values not to be updated in the database. But when i executed the application and called a NamedNativeQuery it updated the table with the mentioned transient variable. I could see the update statements using the show_sql property.
But i could not understand why the Hibernate had to update the table when I executed a named query for selection of rows.
I tried my application with @Transient and here although a column was created for the transient variable but the values were not updated.
But my requirement was not met as @Transient did not update the variable at the application level also. So when the getter method was called it returned a blank value.
Any help here would be great. Thanks.