Danial Pearce writes: > > depending on your database support, I think the best solution would > > be to use a DB trigger on insert , that would just populate all of > > the fields > > As John says somewhere in the documentation. If you are putting > triggers on your DB, why wouldn't you put them in your object as well? > Your object is supposed to know pretty much everything about your DB, > so why would you lie to it and tell it you aren't using any triggers? > Don't lie, it makes baby jesus cry. > > I can think of examples where you might want the defaults and triggers > to be doing slightly different things in the perl, but if you tell > perl there are no triggers, but the DB really does have them, then > when you save the object you aren't going to see all the work of that > trigger until you re-load the object. Rose is good, but it's not magic > enough to do what you meant.
Well, it's possible that the database might have a life outside of its perl-based interactions. People could be inserting stuff via sql, from SomeOtherLanguage(tm), or long after Perl's gone the way of COBOL (HAPPY 100th Grace!). g. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rose-db-object
