Top "Associations" questions

Associations typically refer to relationships between models in ORMs such as ActiveRecord.

What is the difference between association, aggregation and composition?

What is the difference between association, aggregation, and composition? Please explain in terms of implementation.

oop uml associations aggregation composition
What is the difference between Unidirectional and Bidirectional JPA and Hibernate associations?

What is the difference between Unidirectional and Bidirectional associations? Since the table generated in the db are all the same,…

java hibernate jpa orm associations
Rails :dependent => :destroy VS :dependent => :delete_all

In rails guides it's described like this: Objects will be in addition destroyed if they’re associated with :dependent => :…

ruby-on-rails ruby model associations
Build vs new in Rails 3

In the Rails 3 docs, the build method for associations is described as being the same as the new method, but …

ruby-on-rails ruby-on-rails-3 associations
Rails: Using build with a has_one association in rails

In this example, I create a user with no profile, then later on create a profile for that user. I …

ruby-on-rails associations has-one database-relations
MongoDB Many-to-Many Association

How would you do a many-to-many association with MongoDB? For example; let's say you have a Users table and a …

many-to-many associations mongodb
Rails migration: t.references with alternative name?

So I have a create_table like this for Courses at a School: create_table :courses do |t| t.string :…

ruby-on-rails associations migration
What is causing this ActiveRecord::ReadOnlyRecord error?

This follows this prior question, which was answered. I actually discovered I could remove a join from that query, so …

ruby-on-rails ruby activerecord join associations
Hibernate @OneToMany remove child from list when updating parent

I have the following entities: TEAM @Entity @Table public class Team { [..] private Set<UserTeamRole> userTeamRoles; /** * @return the userTeamRoles */ @…

database hibernate jpa associations one-to-many
Rails console: Unable to autoload constant

I have a Customer_ratings model that allows users to leave feedback on each other. The web app is working …

ruby-on-rails-4 associations autoload rails-console