Entity beans can't use database defaults.  The EJB spec requires that 
all cmp-fields be initialized to Java defaults, so the defaults will 
always be overwritten.  I suggest you set your defaults in the ejbCreate 
method.

-dain

Saroj Kumar wrote:
> Hi All,
> 
> I have a scenario which I think is very common.
> 
> Some fields are defined as NOT NULL in DB but they do have DEFAULTS set.
> If I don't include them in ejbCreate params then it fails to create any
> Record. 
> 
> Is there a way to specify that this value is to be taken from DB
> If not defined in ejbCreate.
> 
> How is this case handled? If I have to pass the value in ejbCreate()
> Then I am unable to get the benefit of DB Defaults as I need to pass 
> Them.
> 
> Any ideas??
> 
> TIA,
> Saroj
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user


-- 
xxxxxxxxxxxxxxxxxxxxxxxx
Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to