Welcome Guest, Not a member yet? Register   Sign In
Database structure with Datamapper and nestedsets - need help
#10

[eluser]WanWizard[/eluser]
You can't create a relation table with more than 2 foreign keys. Well, you can, but Datamapper doesn't support it.

If Issue has a one-to-one relation with the relation between Province and Book (i.e. any combination of Province and Book may have 1 issue, but only one), I would not make it to complex, and add the columns to the relation table, like rate_pdf. Allow a NULL value to indicate whether or not there is an issue.

If you want to make a separate table that needs to be related to the relation between Province and Book, the only option is to make a model for that table, but that will make it a lot more complex.


Messages In This Thread
Database structure with Datamapper and nestedsets - need help - by El Forum - 03-23-2013, 11:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB