search

Home  >  Q&A  >  body text

java - mybatis可以级联保存,更新吗?

级联查询没问题文档里很清楚,保存更新貌似没有,这个自己要怎么实现阿?

巴扎黑巴扎黑2830 days ago898

reply all(4)I'll reply

  • 迷茫

    迷茫2017-04-17 14:01:07

    The biggest advantage of mybatis is its flexibility. Currently, there is no cascading save and update. More complex SQL statements need to be written by yourself. If it is a larger project and the database relationship is more complex, Hibernate is recommended

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 14:01:07

    Mybatis only executes the sql you scheduled in mapper. Whether it can be cascaded depends on your sql. Instead of directly operating objects like hibernate.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 14:01:07

    It has nothing to do with mybatis. Mybatis is just an ORM, a framework for executing configuration files.

    reply
    0
  • 阿神

    阿神2017-04-17 14:01:07

    This has nothing to do with mybatis. Mybatis only provides mapping from entity classes to SQL tables. As for whether cascade operations can be performed, it depends on how the tables in your database are designed. . . .

    reply
    0
  • Cancelreply