I have to be the user's table. These users will have no contacts and n messages ..
My code is:
... Class User includes DataMaper :: resource includes the property: ID, serial ,: Key = & gt; True Property: Alias, String is N: Contacts have N: Message and Class in Contact DataMaper :: Resource Relation: User Properties: ID, Serial, Key: & gt; True property: authgiven, string is 1,: DataMap in the user's end class message :: resources related_to: user property: ID, serial,: key => Correct property: data, string and # appliance model (verification etc.) DataMapper.finalize ...
There is no error in starting the datamaker, but when I use a new user or whatever Try to make, save always lies ... can someone please tell me what is wrong?
I am quite new to the DataMapper, it always works for me with simple tables without relationships, so I believe it is to do the way I declare 1: n relationships. Hey, you have 1,: User line from the contact model and you should be good.
Comments
Post a Comment