Hey,

You might want to give https://github.com/postmodern/dm-is-read_only a try

cheers
snusnu

On Fri, Jan 28, 2011 at 20:12, bvdb <[email protected]> wrote:
> A developer sometimes has to access and present data that existed
> before his application. Common practice is for a database
> administrator to define a database view (with a CREATE VIEW sql
> command, not to be confused with the V in MVC) and give the
> developer access to this.
> A SELECT on a view follows exactly the same syntax as on a normal
> table.
> But UPDATE/INSERT is in most cases not  possible or desireable on a
> view,
> and will fail - so a view is read-only.
>
> Now having some experience with databases but little with RoR I
> couldn't find a "read-only attribute" in DataMapper, nor in
> ActiveRecords.
> Without knowing that a view/table/relation is read-only the ORM could
> generate UPDATEs that produce errors, and leave the user wondering
> why.
> It makes also sense in some cases to define a table read-only for a
> model even it is fully accessible by the framework.
> Is it possible to define read-only access in Datamapper?
> If not, is there another RoR ORM with this feature?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "DataMapper" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/datamapper?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to