java - Postgresql timestamp update set null -


i have problem timestamp field in postgresql database

scheduled_time timestamp without time zone, 

and posibility set null on update. still

error: column "scheduled_time" of type timestamp without time zone expression of type bytea wskazówka: need rewrite or cast expression.

i tried set null, tried set empty string "" tried find solutions @ internet, know work when set @ pgadmin null, when set parameter in

 querystring = "update upload set additional_info=:additionalinfo, customer_id=:customerid, scheduled_time=:scheduledtime upload_id=:uploadid";          final query query = entitymanager.createnativequery(querystring);            query.setparameter("scheduledtime", upload.getscheduledtime());         more setparameters ....         query.executeupdate(); 

its still me message type bytea. can tell me how solve that?

i checking if scheduled null. when true, make

update upload set additional_info=:additionalinfo, customer_id=:customerid, scheduled_time= null upload_id=:uploadid 

else

update upload set additional_info=:additionalinfo, customer_id=:customerid, scheduled_time=:scheduledtime upload_id=:uploadid 

couse didn't find normal solution.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -