- This topic has 2 replies, 2 voices, and was last updated 16 years, 4 months ago by rekhashankara.
-
AuthorPosts
-
rekhashankaraMemberHi
We are using MyEclipse(5.0.1) to autogenerate the pojo, DAO and the hibernate mapping files, in some tables there are few readonly columns i.e. these are actually computed columns, (the ResultSetMetaData’s properties isReadonly, is Writable will return false).
So in the generated hbm file we expect that it should have insert=”false” update=”false” but actually these insert and update attributes are not there in the generated hbm file.
I have checked the template property.hbm.vm, it do has the following lines
#if(! $property.updateable)
update=”false”
#end
#if(! $property.insertable)
insert=”false”
#endwhich should give insert=”false” update=”false” for the readonly columns, but looks like $property.insertable, $property.updateable always returns true irrespective of readonly/writable columns.
Can you please let us know when would the conditions $property.insertable, $property.updateable be satisfied?
And if we want to set some column property to have insert=”false” update=”false” what is hte criteria?Thank you
Brian FernandesModeratorRekha,
The version of ME you are using is nearly 2 years old. Can you try the same with a recent version of ME which has an updated Hibernate core, it is likely that this issue has already been fixed.
Can you tell us – what database (exact version), database driver (try to use the most recent driver) and Hibernate Dialect you are using?
rekhashankaraMemberthe DB we are using is SQL Server 2005 and we use sqlserverdialect and yes the DB driver is updated one.
I will try it with the ME recent version, but i heard that with ME 6.0 also the issue is there, i an verify it again.
But can you please explain in which cases $property.insertable , $property.isupdatable will be true?
-
AuthorPosts