Hibernate 级联保存 一对多的默认 xml
如果要 级联保存 必须加上cascade="save-update"Stentdeng stu=new Studeng();stu.setAge(23);stu.setName("dd");Book book=new Book();book.set......stu.setBook(book)save(stu)inverse为主控方好象,以后在详细了解
Stentdeng stu=new Studeng();stu.setAge(23);stu.setName("dd");Book book=new Book();book.set......stu.setBook(book)save(stu)inverse为主控方好象,以后在详细了解
Stentdeng stu=new Studeng();stu.setAge(23);stu.setName("dd");Book book=new Book();book.set......stu.setBook(book)save(stu)