Top "Belongs-to" questions

This is a master-detail relationship where one item "belongs_to" another and has a foreign key to maintain the relationship.

BelongsTo problem in cakephp and html select, i can't understand how to do that

Simple question by a cakephp noob: i have two models, Player and Team. Team has an id (int) and a …

php cakephp forms belongs-to
Nested attributes for belongs_to association rails

I have two models, Complaint and Company. Complaint belongs_to and accepts_nested_attributes for Company, and Company has_many …

forms ruby-on-rails-3.2 has-many belongs-to rails-models
Laravel belongsTo with condition and eager load

I have a Post model associated to a Section model, which depend on an extra condition to work: <?php …

laravel eager-loading belongs-to
Ruby on Rails: Nested Attributes, belongs_to relation

I have a User entity that has a Current Location field (city and country). To hold this info I created …

ruby-on-rails attributes nested belongs-to
ruby on rails - how to make relationship works in route, controller, view ? has_many, belongs_to

I am struggling to get my relationship in rails to work. I have a User,Gallery,Comment model class Gallery …

ruby-on-rails associations relationship has-many belongs-to
CakePHP hasOne/belongsTo model relationship

I have a few models I'm trying to relate. One model is Item, one is Slide, and another is Asset. …

cakephp orm relationship belongs-to has-one
Rails has many and belongs to one

I have a User model which has many projects and a Project model which can have many users, but also …

ruby-on-rails associations has-many has-many-through belongs-to
Rails Form with belongs_to Association

I'm very new to Rails so this may be an obvious problem, and if so I apologize. I am trying …

ruby-on-rails forms belongs-to
Explain belongsTo in Grails

From the Grails belongsTo documentation, what is the use of class Book { static belongsTo = Author } What is the impact of …

grails gorm belongs-to
Rails 3 - Nested resources and polymorphic paths: OK to two levels, but break at three

I'm trying to do a simple family reunion site with: "posts", "families", "kids", and "pictures". Ideally I'd like the routes/…

ruby-on-rails-3 polymorphic-associations belongs-to nested-routes