Lecture 12 - Associations.pdf
Lecture 12 - Associations.pdf

2 Pages
56 Views
Unlock Document

School
University of California - Berkeley
Department
Computer Science
Course
COMPSCI 169
Professor
Bonnie Fox
Semester
Fall

Description
CS169: Software Engineering October 14, 2013 Announcements ❏ Complete mid semester survey ❏ Sign up for face to face project meetings with GSI Associations: Mechanics ❏ models must have attribute for foreign key ❏ ActiveRecord manages it, not you! ❏ For one-to-many association: ❏ Add has_many to owning model and belongs_to to owned model ❏ Create migration to add foreign key to owned side that references owning side ❏ Apply migration ❏ rake db:test:prepare to regenerate test database schema Through Associations ❏ but what about multiple associations? ❏ add multiple “has_many” and “belongs_to” ❏ Mvigor asmay reies ❏ Mvi hs_an :evews ❏ Rviw elng_t :oveger ❏ Rviw elng_t :ove ❏ but how would we get all the movies reviewed by a moviegoer? ❏ moviegs_an :oves
More Less

Related notes for COMPSCI 169

Log In


OR

Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.

Submit