Welcome Guest, Not a member yet? Register   Sign In
Datamapper ORM question
#1

[eluser]dudel[/eluser]
I have 4 services (wich will be never changed, i keep them in an array, there is nothing in db but the id of each one).
Each service have 4 tabs.
Each tab can have multiple texts.

I have a tabel services and another table services_texts
relation many to many;

services with (id,tab_id,service_id,picture,template,status)
services_text (id,tab_id,service_id, picture,text)

Can someone tell me if it's posible with datamapper to set the joining field service_id from services_texts to relate with the service_id instead of id from services table and the tab_id from services_text with the tab_id from services?

Thank you Smile
#2

[eluser]WanWizard[/eluser]
No, Datamappers relations are defined by primary key -> foreign key.




Theme © iAndrew 2016 - Forum software by © MyBB