set the object property or add the object to the collection • When saving an object with a relationship, you must save the dependent object first 13 >>> p = Person(first_name='John', last_name='Doe') >>> a1 = Address(street_address_1='123 Main Street', city='New York', state_province='NY', postal_code='10003', country='us') >>> a1.person = p >>> p.addresses.add(a1) ... IntegrityError: project_address.person_id may not be NULL >>> p.addresses.add(a1) DEBUG 2012-10-23 05:30:29,305 util 4130 140657423681280 (0.000) INSERT INTO "project_address" ("person_id", "street_address_1", "street_address_2", "city", "state_province", "postal_code", "country") VALUES (1, 123 Main Street, , New York, NY, 10003, us); args=[1, '123 Main Street', '', 'New York', 'NY', '10003', 'us']