I wonder how hard it would be to import the default from the metadata..
defaults are on the 2.0 roadmap right now I think. Including it in the
reverse engineer might be a nice added touch..
On 3/13/06, Gentry, Michael (Contractor) <michael_gentr..anniemae.com>
wrote:
>
> Also, the default value can be left in the database for documentation
> and non-ORM purposes, but that column should be definitely be flagged as
> Not Null in Cayenne Modeler and a default value assigned in the Java
> class. This is how ORMs (not just Cayenne) expect to function.
>
> /dev/mrg
>
>
> -----Original Message-----
> From: Mike Kienenberger [mailto:mkienen..mail.com]
> Sent: Sunday, March 12, 2006 4:25 PM
> To: cayenne-use..bjectstyle.org
> Subject: Re: violates not-null constraint question.
>
>
> On 3/12/06, Joshua Pyle <joshua.t.pyl..mail.com> wrote:
> > Mike makes a point that I had trouble seeing when I first started
> > using ORM's. In order to use the default values the ORM would havre
> > the object and then read it evry time and insert or update was
> > performed. This would cause slowdown and inefficiency.
> >
> > In the end default database values and an ORM just don't mix.
>
> And it's not like I came up with this brilliant thought on my own
> either -- I also thought I should be able to use DB default values
> when I first started using ORMs. I also had to have it explained to
> me as well :) The same thing applies to auto-increment db-side
> generated primary key values, although Andrus (and others) have worked
> out the methodology to "read-back" that db-side generated value.
>
> -Mike
>
This archive was generated by hypermail 2.0.0 : Wed Mar 15 2006 - 19:08:29 EST