New Posts New Posts RSS Feed: Read-Only Entity Model?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Read-Only Entity Model?

 Post Reply Post Reply
Author
katit View Drop Down
Senior Member
Senior Member


Joined: 09-Sep-2011
Posts: 146
Post Options Post Options   Quote katit Quote  Post ReplyReply Direct Link To This Post Topic: Read-Only Entity Model?
    Posted: 03-Nov-2011 at 8:08am
I need to create another EntityManager for data lookups. It will be based on views from database.
 
I would like to make all of those entities "read only" and as light as possible. I turned off validation and attributes. I also would like to set it so it's read-only so in code only queries can run against this manager. How do I achieve this?
 
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 03-Nov-2011 at 11:43am
Hi katit;

By default, database views are read-only. You can make a db view updatable by following this guide. http://blogs.msdn.com/b/alexj/archive/2009/09/01/tip-34-how-to-work-with-updatable-views.aspx

In DevForce, to limit access to entities, you can



3. Intercept the save on the server by inheriting from EntityServerSaveInterceptor class and override its AuthorizeSave method. http://drc.ideablade.com/xwiki/bin/view/Documentation/save-lifecycle-server#HInterceptortemplatemethods

Hope this helps.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down