Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. private Date date;
  2. private List<AdsEntity> adsDetails;
  3.  
  4. ... getters and setters
  5.  
  6. private int id;
  7. private String description;
  8.  
  9. @Insert({
  10. "<script>",
  11. "INSERT INTO tb_ads_details (idMyInfo, adDate)"
  12. + " VALUES"
  13. + " <foreach item='adsDetails' index='index' collection='adsDetails' separator=',' statement='SELECT LAST_INSERT_ID()' keyProperty='id' order='AFTER' resultType='java.lang.Integer'>"
  14. + " (#{adsDetails.idMyInfo, jdbcType=INTEGER}, #{adsDetails.adDate, jdbcType=DATE}) "
  15. + " </foreach> ",
  16. "</script>"})
  17. void saveAdsDetails(@Param("adsDetails") List<AdsDetailsEntity> adsDetails);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement