On Jun 27, 2006, at 4:46 PM, John Siracusa wrote: > Right, because you did not specify a default value for the "active" > column, > and RDBO includes values for all columns on insert. correct. i got that from the docs.
>> is there any way to not define the default value in perl, and just >> let the db specify it? > Well, you can auto-initialize your columns. This will look up column > information, including default values, from the database. You can > also > auto-initialize your entire class, which will pick up the primary key, > foreign keys, and so on. Both of these options mean that the > database will > be accessed when this module is loaded. > > But it'd be simpler to just specify the default value in the Perl > code. > > The update() method has a changes_only parameter that instructs it > to only > update the columns whose values have been modified. I suppose I > should add > the same option to the insert() method (thus making it also valid > on all > calls to the save() method). I'll add it to my list... auto-initialize : might do specify in perl code : i'd rather not. i'm trying to keep as much out of perl as necessary, esp default column values. if they change, i dont want to update them in more than 1 place. changes_only on save: i was actually hoping that existed already, as i saw it on insert. | - - - - - - - - - - - - - - - - - - - - | RoadSound.com / Indie-Rock.net | Collaborative Online Management And Syndication Tools | - - - - - - - - - - - - - - - - - - - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object