On Wednesday 03 January 2007 12:20, Ash Berlin wrote:
Marc Logghe wrote:
(...)
# only want the output from the template,
# no wrapping wanted
$c-stash-{nowrap} = 1;
(...)
No no no no - don't forward to the view and mess about with resetting
stash params/body. Look at the docs on
Hello all,
I'm sorry if it is the wrong list, but I thought it was more a
Catalyst-specific issue than a DBIx::Class one, as it is about the way
Catalyst uses DBIx::Class.
I would like to use transactions in Catalyst.
my $transaction = $c-model('MyAppDB')-storage;
$transaction-txn_begin;
eval
Xavier Robin wrote:
Hello all,
I'm sorry if it is the wrong list, but I thought it was more a
Catalyst-specific issue than a DBIx::Class one, as it is about the way
Catalyst uses DBIx::Class.
I would like to use transactions in Catalyst.
my $transaction = $c-model('MyAppDB')-storage;
On 1/4/07, Xavier Robin [EMAIL PROTECTED] wrote:
[...]
my $transaction = $c-model('MyAppDB')-storage;
$transaction-txn_begin;
eval {
# Do some insertions with $c-model('MyAppDB::Table')-create()
};
if ($@) {
$transaction-txn_rollback;
}
else {
$transaction-txn_commit;
}
Fist of
On Thu, Jan 04, 2007 at 11:11:10AM +, Ash Berlin wrote:
$c-model('MyAppDB')-txn_do(sub {
# Do some insertions here
});
Yes, this is pretty much how I do it too, e.g.:
sub _add_new_reply {
my ($self, $c) = @_;
my ($new_reply);
# some checks
# otherwise, the form
+[ Brian Kirkbride [EMAIL PROTECTED] (03.Jan.2007 17:16):
|
[snipped]
| The problem is that the resultset is empty when I try to
| iterate over it the second time.
|
| So far the only way I've found to make this work is
| to do N separate searches, fill N stash elements, et cetera
|
|
On Thu, Jan 04, 2007 at 10:45:49AM +0100, Xavier Robin wrote:
Hello all,
I'm sorry if it is the wrong list, but I thought it was more a
Catalyst-specific issue than a DBIx::Class one, as it is about the way
Catalyst uses DBIx::Class.
Related to Catalyst, my do_transaction is in my base
Xavier Robin wrote:
I mean, my application died once before the rollback and everything went
wrong. I think this is because Catalyst connects only once, so all the work
is done under the same connexion.
That doesn't really make sense. It can't use the same connection from
different
Hi,
I want to get some messages from a database using DBIx::Class, then to pass
them to TT, but I also want to make some preformatting before sending to TT.
(I don't know if TT can do what I want).
I did:
@messages = $c-model(Db::Forum)-search({
id_room = $id_room,
},
{
join = id_user,