Hello all -
I would like to set a timestamp every time an object is updated in db.
What is the best approach to do this? I was thinking to use Event
model when BeforeUpdate is fired, by adding a test of the object type
each time I would like to set a timestamp...
Thanks for your advises,
Aurel
An observer would certainly work. I do it in my populate() method. I
have a populate() method defined in my abstract decorator (which all
decorators extend), to which I pass a structure (e.g., what the user
submitted or a structure that I build myself). It then calls all the
necessary setters t
Whooo... Too fast this community within I'm new...
Thanks for your answers. I'm going to try the "within db" proposed by
Matt, it seems so easy... ;-)
--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group/tr
only downside to matts approach is that, to put the *updated* timestamp on
there, you will need to create an update trigger to set a new one each time
its saved, otherwise you will only ever have the 'create' timestamp.
Chris Peterson
On Tue, Feb 3, 2009 at 10:09 AM, aurel wrote:
>
> Whooow
That is true. Also, your business logic will be tightly coupled with
your dbms, which eliminates some of the benefits of using Transfer. I
would personally stay away from putting business logic in the dbms if
there was a way for me to put it at a higher level.
On Tue, Feb 3, 2009 at 10:19 AM, C
Hello again -
I'm investigating a problem I do not manage to resolve since 2 days...
I'm going crazy with this...
I've isolated where is the problem but I do not understand.
Any help would be so appreciated !
Here is my config :
http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchem
Thanks Chris. It's my conclusion too. And triggers are highly
forbidden in my mind (so many side effects).
I'm going back to understand your proposition Bob!
--~--~-~--~~~---~--~~
Before posting questions to the group please read:
http://groups.google.com/group
I get the error: "Element QOBJECT.TRANSFER_COMPOSITEID is undefined in
ARGUMENTS" everytime I try to do a simple "getProduct()"
:::My Transfer.xml:::
If the intent is to know when a record in a database was updated, regardless
of what updated it or how, allowing the database to handle its own logging
is a good answer. If you rely on the database to know when the database was
updated, then you know that the timestamp will be recorded no matter w
I'm sure this is a trivial issue. I've modified the way to link the
locale.Menu to locale.Langue :
I'd do that within the database. Have a LastUpdated field with a
default value of the current date/time.
My $0.02
On 2/3/09, aurel wrote:
>
> Hello all -
>
> I would like to set a timestamp every time an object is updated in db.
>
> What is the best approach to do this? I was thinking to use E
because when transfer saves any of those objects, it has to re-save the
entire related set. Turn on query debugging and watch what is going on
there.
Often times I find myself using manyToOne relationships from the child
objects, or (more often lately) re-producing my desired effect with a simple
If you are using MySQL, you can set one field to track the last updated
timestamp without a trigger.
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
My opinion on timestamps has changed several times. At present, I'm more
inclined to enforce timestamp updates within t
Sounds like a good plan to me :)
Mark
On 2/3/09, aurel wrote:
>
> Hello all -
>
> I would like to set a timestamp every time an object is updated in db.
>
> What is the best approach to do this? I was thinking to use Event
> model when BeforeUpdate is fired, by adding a test of the object type
How many locale's do you have?
Mark
On Wed, Feb 4, 2009 at 4:23 AM, Chris Peterson wrote:
> because when transfer saves any of those objects, it has to re-save the
> entire related set. Turn on query debugging and watch what is going on
> there.
>
> Often times I find myself using manyToOne re
On Wed, Feb 4, 2009 at 4:23 AM, Chris Peterson wrote:
> because when transfer saves any of those objects, it has to re-save the
> entire related set. Turn on query debugging and watch what is going on
> there.
Unless you are using cascadeSave(), transfer doesn't save the entire set.
> Often
I've got a onetomany relationship in my transfer xml doc that I'm
trying to add an object to. The add method, in my case
addenhanced_template_theme, fails with an error: The
addenhanced_template_theme package method in the C:\www\eteamz
\frameworks\transfer\com\TransferObject.cfc component cannot
Can I grab the full error?
Not knowing where the error actual fires within transfer, leaves me a bit
stuck :(
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
Mark
On Wed, Feb 4, 2009 at 2:50 AM, Jorge Loyo wrote:
>
> I get the error: "Element QOBJECT.T
There is no addXXX method for OneToMany. You need to use setParentXXX
on the child.
See: http://docs.transfer-orm.com/wiki/Generated_Methods.cfm#OneToMany_Element
On Tue, Feb 3, 2009 at 6:13 PM, john.ra...@gmail.com
wrote:
>
> I've got a onetomany relationship in my transfer xml doc that I'm
19 matches
Mail list logo