X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship%2FBase.pm;h=c865642a770b19f83ef1a09a5c876fac1c4a730a;hb=ac8e89d7b8106edf37bd4806fa6a052dba0ab469;hp=8409165c83a5f091757718b0b2ea0023fdab600b;hpb=4494d3c6fa2e336fe58aa77450db1576989b56ff;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Relationship/Base.pm b/lib/DBIx/Class/Relationship/Base.pm index 8409165..c865642 100644 --- a/lib/DBIx/Class/Relationship/Base.pm +++ b/lib/DBIx/Class/Relationship/Base.pm @@ -317,12 +317,16 @@ sub update_or_create_related { =head2 set_from_related $book->set_from_related('author', $author_obj); + $book->author($author_obj); ## same thing Set column values on the current object, using related values from the given related object. This is used to associate previously separate objects, for example, to set the correct author for a book, find the Author object, then call set_from_related on the book. +This is called internally when you pass existing objects as values to +L, or pass an object to a belongs_to acessor. + The columns are only set in the local copy of the object, call L to set them in the storage.