Hello,

Getting OJB up and running... so far so good except for one thing.  I make heavy use 
of default values in PostgreSQL... for example:

create table test (my_date timestamp default current_timestamp);

When OJB inserts a record into a table like this, it sets a null value for this field. 
So the resulting field value is null in the new record instead of my default value.  
Short of removing the field from the repository descriptor, how can I keep these 
default values from getting clobbered? I saw in the ojb-user archives someone 
suggested dynamically removing (and later, re-adding) the field from OJB when 
inserting..... I guess it might work, but that is highly undesirable... what a mess 
that would be.  Again, I'm a newbie so there's probably much I don't know, but it 
seems like it would make more sense for OJB to only generate SQL for those fields 
which have been explicity set by the user/app..... so don't set a field to null unless 
I told it to set it to null.... and if I haven't explicitly set a value for a field, 
then don't include it in the sql statement.  That would solve this problem, and I 
would think be more efficient overall.

 



---------------------------------
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site

Reply via email to