repositories

13 views
Skip to first unread message

Gabe Anzelini

unread,
Mar 29, 2012, 7:25:30 PM3/29/12
to DataMapper
I am need of a setup where I can have on model stored in a pg database
and another is pulled from a legacy system. I need to have
relationships between the two and I really only want to specify which
repository each model is associated with once. Is this possible? And
if so, where can I find the documentation to do it?

Thanks.

李貌

unread,
Mar 30, 2012, 11:38:30 AM3/30/12
to datam...@googlegroups.com
You need to setup connection, specific repository name in query and declare them in association.
Please refer to  http://cheat.errtheblog.com/s/datamapper/

  DataMapper.setup(:external, "adapter://username:password@hostname/dbname")
DataMapper.repository(:external) do...end
Association: has n, :things, :repository => repository(:external)


B.Rs
stcatz

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

Reply all
Reply to author
Forward
0 new messages