in reply to Re: Inserting a relation into a database with Class::DBI
in thread Inserting a relation into a database with Class::DBI
Namely, I only want a single insert taking place in this code (instead of one insert each for $session_rec and $user_rec). Since there's no need to touch the database twice, it feels dirty to me to issue two queries for an action that could be done in parallel.
Is there a way to compress the inserts into a single call (or at least a single database access)? Since $session_rec has a has_a() relationship with $user_rec, I don't see why DBI::Class wouldn't be smart enough to handle this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Inserting a relation into a database with Class::DBI
by agianni (Hermit) on May 29, 2007 at 17:54 UTC |