I tried just now, I replaced the create({...}) with populate([{...}]) but the result is same. When I turn on DBI_TRACE I clearly see the SELECT FROM address table, which I want to avoid.
Roman 2018-02-03 19:08 GMT+01:00 Andrew Beverley <a...@andybev.com>: > On Sat, 3 Feb 2018 17:05:06 +0100 Roman Daniel wrote: > > When I create customer together with address and pass the adress as > > hashref (which is very comfortable), the address resultset is first > > searched for the values passed and only if the address is not found, > > new address is created. > > > > Is there a way to make DBIC skip the find and always create the > > related record (while passing related record as plain hashref)? > > Have you tried using populate() instead of create()? > > Andy > > _______________________________________________ > List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class > IRC: irc.perl.org#dbix-class > SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ > Searchable Archive: http://www.grokbase.com/group/ > dbix-class@lists.scsys.co.uk >
_______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk