Home > database >  Using annotations @ Insert problems
Using annotations @ Insert problems

Time:10-08

Version: Orcale 11 g
The code is as follows:
@ Insert (" & lt; Script>"
+ "INSERT INTO
"+ "" menu \ ""
+ "("
+ "" menu_uid \ ", "
+ "" create_time \ ", "
The create_user + "" \ ", "
+ "" last_update_time \ ", "
+ "" last_update_user \ ", "
+ "" name \ ", "
+ "" level \ ", "
Url + "" \ ", "
+ "" first_menu_id \ ", "
+ "" menu_explain \ ""
+ ") "
+ "VALUES", "
+ "("
+ "# {menu_uid},"
+ "TO_DATE (# {create_time}, 'yyyy - mm - dd hh24: mi: ss'),"
+ "# {the create_user},"
+ "TO_DATE (# {create_time}, 'yyyy - mm - dd hh24: mi: ss'),"
+ "# {last_update_user},"
+ "# {name},"
+ "# {level},"
+ "# {url},"
+ "# {first_menu_id},"
+ "# {menu_explain}
"+ ") "
+ "& lt;/script>" )
//save menu information
Int saveMenu (MenuBean MenuBean, String create_time);

The console is as follows:



Description: the project configuration the SQL to print, the above select statement printed out with parameters of the insert statement did not print it out, control layer and Service layer are successfully carried parameters, the database also failed to insert data, solving,

Supplement: parameters with the following figure (confirm that had a database field is not empty, etc.)


CodePudding user response:

Is there an error?
Another insert statement execution is submitted to commit or, use this statement inserts will automatically submit?

CodePudding user response:

reference 1st floor js14982 response:
is there any error?
Another insert statement execution is submitted to commit or, use this statement inserts will automatically submit?


There is no error, the console all of the information in the above

CodePudding user response:

Explicitly commit a try, that is, add a commit

CodePudding user response:

Still won't do

reference js14982 reply: 3/f
explicitly commit a try, or add a commit
  • Related