cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: How to set default values or use triggers for a column?
Date Thu, 22 Feb 2007 16:53:26 GMT
There's nothing sacred about having your cayenne model match your db schema.
For performance reasons, you only want to pull in columns you actually
need anyway.

Because this field is being updated external your application,
attempting to track it in Cayenne would be nightmare in any case.

If you don't need the modification date in your app, dump it from your model.


On 2/22/07, Török Péter <torokp@allround.net> wrote:
>
>
> I have an attribute in some of my tables which are supposed to store the
> date&time of the record's last modification. The idea (coming from our DB
> expert) is that we set the default value (SYSDATE) in the DB and update the
> value via a trigger whenever the record is modified. Is there a way to tell
> Cayenne to leave that column in peace?
> I guess if I leave it out from the model completely, that would do... but
> then the DB schema and the Cayenne model would not be in sync :-(
> Any hints?
> Thanks in advance,
> Péter
>

Mime
View raw message