Welcome Guest, Not a member yet? Register   Sign In
How do you setup relationships with DMZ using 3 data tables and a single join table?
#11

[eluser]WanWizard[/eluser]
I still see the dot in the join table name, what is it doing there? You're storing the junction table in a separate database? Or relations over several databases?
#12

[eluser]sideshowbob[/eluser]
Yes, there are 2 databases involved.

I have users in db1 but roles, modules and the join table(many_links) are in db2.

I hope my explanation makes sense, sorry for being unclear.
#13

[eluser]WanWizard[/eluser]
Ok, clear.

That is an unsupported setup though, so if it works, fine. Can you also run queries across databases ( like $role->user->get() to fetch all users that have a specific role )?
#14

[eluser]sideshowbob[/eluser]
Yes, this is exactly how it works.

Please consider implementing my hack (but probably in a much nicer way) for future releases of DMZ :-)
#15

[eluser]WanWizard[/eluser]
Please create an issue on http://bitbucket.org/wanwizard/datamapper/issues, with a link to this thread, so I won't forget it...




Theme © iAndrew 2016 - Forum software by © MyBB