• Post Reply Bookmark Topic Watch Topic
  • New Topic

make db table read only  RSS feed

 
Madhu Sudhana
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I make a table in database read only making use of hibernate?

is there any property in hbm.xml file so that I can say that this table is read only.....?
 
Paras Jain
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can set mutable="false" in the hbm mapping file
 
Madhu Sudhana
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi thanks for reply

and I found this statement in Hiberbate reference document......

Immutable classes, mutable="false", may not be updated or deleted by the application. This allows Hibernate to make some minor performance optimizations.

so then I have restrict insertions also.......

how can I proceed?
 
Paras Jain
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Immutable classes, mutable="false", may not be updated or deleted by the application. This allows Hibernate to make some minor performance optimizations.

so then I have restrict insertions also.......


Yes, with mutable="false" you can restrict updation and deletion. But you can do insertions. That is what you want to achieve right?

how can I proceed?

what do you want to do next.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!