java - Empty fields are being sent to database -


i using hibernate . have dao :

public interface dmrequestdao extends daosupport<dmrequestdomain> 

where

 dmrequestdomain extends jodaidtrackablebaseentity<dmrequestdomain>  

and annotated @entity.

this contains column names table represents.

then service class has above dao object autowired. can see values of dmrequestdomain being correctly printed in log file.

but when call add on dao, see in server logs empty values being sent.

dmprequestdao.add(object of dmrequestdomain); 

what probable cause here.

the query see in server logs is

insert     dm_request     (created_by, created_date, modified_by, modified_date, version, disconnect_reason, disconnect_reason_code,  id) values     (?, ?, ?, ?, ?, ?, ?, ?,)> 

using columns in insert/update-statements hibernates/jpas default behaviour.

you change annotating @entity @dynamicinsert and/or @dynamicupdate.

however, aware non standard (non jpa) annotations , performance-impact may negative ...


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -