什么是在Hibernate中级联? [英] What is cascading in Hibernate?

查看:120
本文介绍了什么是在Hibernate中级联?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hibernate中级联是什么?我在 map 标签中看到了 cascade 属性。这是什么意思?



cascade = all 是什么意思?还有其他一些属性,如:

cascade =none | save-update | delete | all-delete-orphan | delete-orphan / p>

解决方案

级联是关于删除数据库中的一个对象,导致删除其他(依赖)对象....虽然当然通常是实际上被删除的数据库行。



级联还可以应用于保存/更新。


What is cascading in Hibernate ? There is a cascade attribute I have seen in the map tag. What is it meant for?

Like what does cascade = all mean? There are other attributes I read like
cascade="none|save-update|delete|all-delete-orphan|delete-orphan".

解决方案

Cascading is about deletion of one object from the database causing deletion of other (dependent) objects .... though of course it is typically database rows that are actually getting deleted.

Cascading can also apply to saves / updates as well.

这篇关于什么是在Hibernate中级联?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆