You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to restfulx-framework
Hello everyone,
I have a model that contains an integer attribute called "tweet_id".
When I try to get data from the database it always comes as zero. I
started diggin in the restfulx code and discovered that when the xml
is being unmarshalled there is an if statement that looks for "_id" in
the name of the attribute:
Because the name of the attribute containds '_id' then the value is
never set. I don't have a Model called Tweet so there is no
relationship to be found with other models. I just need to bring the
tweet_id value to my model but it gets lost when unmarshalling.
Any suggestions on how to avoid this?
Thanks !!
Regards,
Enrique
Dima Berastau
unread,
Dec 1, 2009, 9:05:05 PM12/1/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to restfulx-...@googlegroups.com
Hi Enrique,
Yes, don't call your model attributes *_id or *_type, these are reserved for relationships and inheritance (borrowed from Rails).