facebook

Issue with the autogenerated hbm files

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #286090 Reply

    Hi

    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”
    #end

    which 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

    #286158 Reply

    Brian Fernandes
    Moderator

    Rekha,

    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?

    #286159 Reply

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

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Issue with the autogenerated hbm files

You must be logged in to post in the forum log in