Hello, I am using datamapper in a ruby application and I'm facing a problem I do not understand.
I have a Appartment model and a Location model. An appartment is at a given location and several appartments can be at the same location. This typically described a 1-n relationship (I guess :-) )
My feeeling is that in the Appartement sql table I need a location_id but I do not want any Appartment pointers within the Location table. For me, Location should live on its own and should not reference appartment.
In the Appartement ruby class, I have added:
has n, Location
but it then creates an appartment_id within the Location ruby class, which I do not want.
Would you have any clue ?
Thanks a lot, Luc