1

I am using namedParameter to insert in table. lets say user table where active flag is defaulted to 1 in mysql and marked as NOT NULL.

What I want is if I have value for active I will set it through java code but if not I would set it null and expecting MySql to set the defaulted value but I get the exception

org.springframework.dao.InvalidDataAccessApiUsageException: No value supplied for the SQL parameter 'passwordType': No value registered for key 'active' at

How can I achieve desirable behavior?

Misha Zaslavsky
  • 8,414
  • 11
  • 70
  • 116
rachana
  • 221
  • 1
  • 3
  • 8

0 Answers0