Merge 'DBIx-Class-current' into 'bulk_create'
Jess Robinson [Tue, 8 May 2007 20:08:06 +0000 (20:08 +0000)]
r3267@lilith (orig r3265):  ash | 2007-05-08 20:35:36 +0100
Unbreak back-compat
r3268@lilith (orig r3266):  ash | 2007-05-08 20:41:38 +0100
Move -result_source handling further up

1  2 
lib/DBIx/Class/Row.pm

@@@ -28,23 -27,10 +28,23 @@@ derived from L<DBIx::Class::ResultSourc
  
  Creates a new row object from column => value mappings passed as a hash ref
  
 +Passing an object, or an arrayref of objects as a value will call
 +L<DBIx::Class::Relationship::Base/set_from_related> for you. When
 +passed a hashref or an arrayref of hashrefs as the value, these will
 +be turned into objects via new_related, and treated as if you had
 +passed objects.
 +
  =cut
  
 +## It needs to store the new objects somewhere, and call insert on that list later when insert is called on this object. We may need an accessor for these so the user can retrieve them, if just doing ->new().
 +## This only works because DBIC doesnt yet care to check whether the new_related objects have been passed all their mandatory columns
 +## When doing the later insert, we need to make sure the PKs are set.
 +## using _relationship_data in new and funky ways..
 +## check Relationship::CascadeActions and Relationship::Accessor for compat
 +## tests!
 +
  sub new {
-   my ($class, $attrs, $source) = @_;
+   my ($class, $attrs) = @_;
    $class = ref $class if ref $class;
  
    my $new = { _column_data => {} };