Re: Using a trigger with an object-relational manager

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: Rick Schumeyer <rschumeyer(at)ieee(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Using a trigger with an object-relational manager
Date: 2007-05-23 03:08:29
Message-ID: 08713FB3-FD3F-4F0E-8FE0-FF045C76C59A@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On May 22, 2007, at 21:21 , Rick Schumeyer wrote:

> The problem is that the new A object that rails gets does not see
> the effect of the trigger. If I call the "reload" method, then
> everything is ok.

As ActiveRecord (which I'm assuming you're using with Rails) has no
idea of what is going on in the database (ActiveRecord doesn't have a
concept of triggers), there's no way for it to see the effect of the
trigger without querying the database for the latest information
(which is what you're doing with reload).

Michael Glaesemann
grzm seespotcode net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2007-05-23 03:12:28 Re: Integrity on large sites
Previous Message Ron Johnson 2007-05-23 02:33:53 Re: Integrity on large sites