Home > Back-end >  Please everyone a great god look at the problem?
Please everyone a great god look at the problem?

Time:10-07



Why id is null?

CodePudding user response:

Written: @ the Select (" insert into user values (username, sex, birthday) (# # {username}, {sex}, # {birthday}) ") id is null

CodePudding user response:

The
reference 1 floor Holopainen. Response:
written: @ the Select (" insert into user values (username, sex, birthday) (# # {username}, {sex}, # {birthday}) ") id is null

Your table structure need to be written the id field constraint primary key and since, in this way, when you dao layer assignment, id value in the database will automatically on the maximum id + 1

CodePudding user response:

Id is the primary key and on the database table

CodePudding user response:

When using XML configuration to get id, is only for annotation configuration somehow id is null,

CodePudding user response:

Has been solved, select insert instead
  • Related