cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Reich <markus.re...@markusreich.at>
Subject Re: Default values in DB
Date Tue, 24 Jun 2014 10:51:28 GMT
Hmm, I think it's just the INSERT command, a solution would be that only
values are inserted that are not NULL? As you check on UPDATE, the SET part
includes just fields that were really changed?

or am I missing sthg.?


2014-06-16 9:56 GMT+02:00 Andrus Adamchik <andrus@objectstyle.org>:

> I would personally do it with a postAdd callback, as mentioned in the top
> thread in Mike’s list.
>
> Andrus
>
> On Jun 13, 2014, at 4:37 PM, Mike Kienenberger <mkienenb@gmail.com> wrote:
>
> > Here are some previous discussions on default values, from most
> > current to ancient.
> >
> > I don't know if this is a complete list.
> >
> > DB default values
> >
> http://mail-archives.apache.org/mod_mbox/cayenne-user/201309.mbox/%3CCAGscxryKQBpmM+KBMXhbgAG3+uVNFCT-xqE6bhTQPAAQNXv_SQ@mail.gmail.com%3E
> >
> > default value from the modeler ?
> >
> http://mail-archives.apache.org/mod_mbox/cayenne-user/201004.mbox/%3Cz2tc9876dc11004140528vfe2dfa5elf7da53f16eb4a6b6@mail.gmail.com%3E
> >
> > Handling of database NULL - default value column to modeler?
> >
> http://mail-archives.apache.org/mod_mbox/cayenne-user/200808.mbox/%3Cc09652430808200246x24c2b07es97dddbed50959a23@mail.gmail.com%3E
> >
> > Setting Default Values for Entities
> >
> http://mail-archives.apache.org/mod_mbox/cayenne-user/200712.mbox/%3C144462.30563.qm@web52704.mail.re2.yahoo.com%3E
> >
> >
> >
> >
> > On Fri, Jun 13, 2014 at 4:56 AM, Chukwuemeka Mbonu Onwukwe
> > <mbonu.onwukwe@gmail.com> wrote:
> >> Hi Markus,
> >> I think it would make sense.
> >> Definitely.
> >>
> >> Regards,
> >> Emeka
> >>
> >> On 13 Jun 2014 09:26, "Markus Reich" <markus.reich@markusreich.at>
> wrote:
> >>>
> >>> Hi,
> >>>
> >>> would it make sense to add in Cayennen Modeler a field to set a default
> >>> value. Cayenne set's per default all fields to null, if they weren't
> set
> >> in
> >>> Java?
> >>>
> >>> regards
> >>> Meex
> >
>
>


-- 
*Markus Reich*
Moosbach 28/2
6392 St. Jakob i.H.
www.markusreich.at / www.meeximum.at
markus.reich@markusreich.at

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message