Hello everyone :)
Maybe someone can help me or redirect me to the correct post.
I would like, with annotation insert a list of object.
There is some of the code:
------------------------------------------------------------------------------------------------------------------------
@Insert("INSERT INTO table1 SET `date` = #8/20/2019")
@SelectKey(statement="SELECT LAST_INSERT_ID()", before=false, resultType=int.class, keyProperty = "id", keyColumn="id")
void save(InfoEntity infoEntity);
------------------------------------------------------------------------------------------------------------------------
Thanks a lot !! :)
@Insert("INSERT INTO table2 (idInfo, sescription) VALUES (
.... Some more code .....
#{details.idInfo}, #{details.description})")
void saveDetails(@Param("details") List<DetailsEntity> detailsEntity);
--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/70b328db-aea7-44d8-b075-676765e85cc5%40googlegroups.com.
Hello everyone :)--
Maybe someone can help me or redirect me to the correct post.
I would like, with annotation insert a list of object.
There is some of the code:
------------------------------------------------------------------------------------------------------------------------
@Insert("INSERT INTO table1 SET `date` = #8/20/2019")
@SelectKey(statement="SELECT LAST_INSERT_ID()", before=false, resultType=int.class, keyProperty = "id", keyColumn="id")
void save(InfoEntity infoEntity);
------------------------------------------------------------------------------------------------------------------------
Thanks a lot !! :)
@Insert("INSERT INTO table2 (idInfo, sescription) VALUES (
.... Some more code .....
#{details.idInfo}, #{details.description})")
void saveDetails(@Param("details") List<DetailsEntity> detailsEntity);
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybati...@googlegroups.com.