sql - Joining model objects in titanium alloy -
suppose have model follows. represents gym.
i have exercise , have exercise type. have many-to-many relationship
exercise { exercise_id name } exercise_type { exercise_type_id name } type_exercise { exercise_id exercise_type_id }
i want display table information
exercise name | exercise type
i know how raw sql query i'm not sure how execute raw sql alloy. , once have proper data, how return collection. tutorials have found show how via xml in situation table columns displayed , match model columns.
thanks, mike
i can recommend reading this:
simple integration of supermodel , appcelerator titanium alloy aaron saunders.
supermodel can handle relationships of models.
Comments
Post a Comment