Hi,

You just need to define
self.default_repository_name; :other_repo_name;end at the beginning of
your model declaration.

For readonly models you can check out dm-is-read_only plugin.

Cheers

# solnic

On Apr 16, 6:37 am, Michishige Kaito <[email protected]> wrote:
> Hey,
>
> I came across the need to define a secondary repository, to access a set
> of data handled by another application. Now, there are two things I
> couldn't find in the API docs.
>
> One, can I set a model to belong to a
> certain repository, in the model declaration, so it doesn't get created
> elsewhere upon running migrations, and so I don't have to wrap all calls
> to it with DataMapper.repository()?
>
> And two, since I'm accessing data handled by another app, it would
> certainly be handy if the models I create for this could be read-only.
>
> Any input is greatly apreciated.

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