set up class as read only

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
gr8user
Posts: 16
Joined: Wed 24 Aug 2016 23:45

set up class as read only

Post by gr8user » Thu 18 May 2017 01:11

Hi,
How can I prevent /not allow insert/update/delete for particular class in Entity Developer using NHibernate Designer?
I have tables from Oracle DB from another application. I updated model from database to add new classes based on tables from particular schema. Our application can select data from these new classes. But insert/update/delete are not allowed. What property of the class should be set?
Thanks,

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: set up class as read only

Post by Shalex » Mon 22 May 2017 17:23

Please open your *.hbml model, select the class, press F4 (Properties) and set:
Mutable=False
Constructor Modifier=Protected

gr8user
Posts: 16
Joined: Wed 24 Aug 2016 23:45

Re: set up class as read only

Post by gr8user » Tue 23 May 2017 22:43

It works!
Thank you.

Post Reply