| Subject: | Re: [cinjug-users] Hibernate and database default values |
|---|---|
| From: | Kedar Jog <kedar.jog@xxxxxxxxx> |
| Date: | Wed, 20 Jul 2005 17:18:02 -0400 |
| Cc: | users@xxxxxxxxxx |
| Delivered-to: | mailing list users@cinjug.org |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QN8ZQSfVSyaEDzWZePOcJtrKQ+NuBJlmp4eNLBIqYQT9Gz4oLClCg6ujqDXD6CWzdKzYWyZbfcFrf0/rbKkbsLrNHFnFXv+PtB5gHRgNKy3sfSME/B7P91D7+nZlXBtbULdT7gs4hbBTXqoUF/ZWRboeCqzBCgiMtGdFB3W3Uz4= |
| In-reply-to: | <bd171aba05072014081a13ca1b@mail.gmail.com> |
| Mailing-list: | contact users-help@cinjug.org; run by ezmlm |
| References: | <bd171aba05072014081a13ca1b@mail.gmail.com> |
| Reply-to: | Kedar Jog <kedar.jog@xxxxxxxxx> |
Hibernate will try and insert whatever the value of the property in your object is if null it will try and persist a null value so on and so forth if the column is not null in the schema why are u passing in a nul value ? if u expect the value to be null , change your xdoclet tags to reflect this situation regenerate your hbm files and regen and redeploy the schema you can also use @hibernate.property formula="some sql stmt" to add a default computed value.... Kedar Jog Senior J2EE Engineer MedPlus (www.medplus.com) On 7/20/05, Bill Manuel <bill.manuel@xxxxxxxxx> wrote: > Does anyone know how to make hibernate accept the default values of the > database on an insert? The column in the database is not nullable, so when > I set the value of the property to null, the database crys becasue of the > null value. > > Any help is appreciated. > > Thanks > Bill Manuel > -- Regards Kedar ----------------------------------- Kedar Jog 5908 Monassas Run Rd Milford OH 45150 |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Hibernate and database default values, Bill Manuel |
|---|---|
| Next by Date: | Re: [cinjug-users] Hibernate and database default values, Chris Nelson |
| Previous by Thread: | Hibernate and database default values, Bill Manuel |
| Next by Thread: | Re: [cinjug-users] Hibernate and database default values, Bill Manuel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |