How to delete all child records when parent record is deleted?
如何删除所有子记录的父记录被删除时?
For example, the record can't be deleted if child records refer to it through a relationship.
例如,如果子记录通过某种关系引用父记录,父记录将无法删除。
Activity records are child records of the Task record, just as the Tasks are child records of the Issue.
活动记录是任务记录的子记录,正如任务记录是问题的子记录一样。
As soon as you load a child record the constraint checks for the related parent record and raises an error.
在加载子记录后,约束会立即检查相关父记录并引发错误。
Provide a link between two tables so that you can find related child records for a particular parent record and vice versa.
提供两个表之间的链接,以便可以为特定的父记录找到相关的子记录,反之亦然。
By saying nothing more than acts_as_tree in your ActiveRecord model, you can dynamically add methods to manage the tree, such as methods that retrieve the parent record or child record.
通过使用ActiveRecord模型中的acts_as _ tree,可以动态地添加方法来管理树,比如检索父记录或子记录的方法。
This tale of a single rescued child hints at some of the reasons for Finland's amazing record of education success.
这个关于一名获救儿童的故事暗示了芬兰在教育方面取得惊人成绩的一些原因。
Of course, as India's dismal record on child malnutrition demonstrates, growth by itself does not solve all the problems of the poor.
当然,像印度那样在儿童营养不良方面有不良记录的国家,就证明增长本身并不能解决穷人的所有问题。
Of course, as India’s dismal record on child malnutrition demonstrates, growth by itself does not solve all the problems of the poor.
当然,像印度那样在儿童营养不良方面有不良记录的国家,就证明增长本身并不能解决穷人的所有问题。
So teach your child to record her own progress. As she sees her improvements her self-beliefs grow!
因此,教你的孩子记录自己的进步吧,当她看到改进时,自信随之成长!
Under a law on children's rights dating from 1998, a man can become the legal father of a child as long as the mother gives her permission and there is no record of a birth father.
根据德国1998年起实施的儿童权利法,只要孩子的生母放弃抚养权且没有孩子生父的有关记录,德国男公民便可以成为孩子的合法养父。
Because there are multiple relationships between the parent customer record and all of its child nodes, all of the pages for the customer-related objects start with a list.
因为在父客户记录和其所有的子节点之间存在着多样的关系,所有客户相关对象的所有页面都开始于一个列表。
A delete operation could remove a record from a parent table, leaving records in an associated child table that no longer have a matching record in the parent table.
一个删除操作可以从一个父表中删除一条记录,使得相关子表中的记录在父表中没有与之匹配的记录。
An update operation could change a record in a parent table, leaving records in an associated child table that no longer have a matching record in the parent table.
一个更新操作可改变父表中的一条记录,使得相关子表中的记录在父表中没有与之匹配的记录。
Marie Michel's fifth child was one for the record books.
玛利亚米歇尔的第五个孩子可以载入世界纪录大全了。
Take the child who made off with some charity sponsorship money, prompting police to record 542 crimes-one for each person who had made a donation.
例如,一个孩子偷走了慈善机构的钱,这就要求警察报告542起案件——针对捐资给该慈善机构的每个人。
An update operation could change a record in a child table such that it no longer has a matching record in the associated parent table.
一个更新操作可改变子表中的一条记录,这样相关父表中不再有一条匹配的记录。
When ON delete set NULL is active, when a record is deleted from the parent table, all records in the child table with matching foreign key values are set to NULL.
当ON DELETESETNULL规则被激活时,如果一条记录从父表中删除,子表中的所有记录以及匹配的外键值都被设置为NULL。
ON DELETE CASCADE—When a record is deleted from the parent table, all records in the child table with matching foreign key values are also deleted.
ON DELETECASCADE —当一条记录从父表中删除时,子表中的所有记录以及匹配的外键值都全部被删除。
When an ON delete CASCADE rule is active, all records in the child table with matching foreign key values are deleted when a record is deleted from the parent table.
当ONDELETECASCADE规则被激活时,当一条记录从父表中删除时,子表中的所有记录以及匹配的外键值都被删除。
You can help your child track his or her distances in a notebook or, more likely, on their computer. Just record the date and the estimate of the distance.
只需要帮孩子把日期和大概的距离记在本子上或者电脑上。
In exchange for the money, Fikriye has to ensure that her child maintains a flawless school attendance record and undergoes regular medical checkups.
作为获得资金的条件,Fikriye必须保证她的孩子充分的出勤率,并定期接受医疗检查。
Amrita Saxena, the mother of the child, said it was difficult for her to believe that her son broke the world record, until a friend convinced her.
该男婴的母亲阿梅·丽塔•莎茜娜说,直到一位朋友告诉她,不然她怎么也不会相信儿子竟然打破了一项世界纪录。
The job center wants its Santas to be child-friendly, good organizers, reliable and have acting skills. They also need a clean police record.
招聘机构要求圣诞老人必须对孩子友好、组织能力强、可信任并有表演才能,并且要无犯罪记录。
The 11-year-old girl's father contacted Guinness World Record staff, requesting that they consider her for the title of hairiest child.
这名11岁女孩的父亲与吉尼斯世界纪录的工作人员取得了联系,并请求他们考虑授予自己女儿“最毛孩”的称号。
The greatest advantage of the Campbell-Stokes Recorder is that it is incredibly easy to use – a young child properly instructed could record the sunshine from one of these marvellous contraptions.
该坎贝尔斯托克斯录像机的最大优点是它非常容易使用 -一个年轻的孩子适当指示可以记录从这些奇妙的玩意儿之一的阳光。
Just as the young parents to record child born just length, weight, arm length, ear length, the initial data is so.
就如同年轻的父母亲,记录下刚刚出生的孩子的身长、体重、臂长、耳长等等的初始数据那般。
The number of active mobile phones in Britain has soared to a record 76.4million –more than one for every man, woman and child in the country.
据英国《每日邮报》11月2日报道,在英国,正在使用中的手机数已经飙升至创纪录的7640万——这一数字超过了人手一部的数量。
The number of active mobile phones in Britain has soared to a record 76.4million –more than one for every man, woman and child in the country.
据英国《每日邮报》11月2日报道,在英国,正在使用中的手机数已经飙升至创纪录的7640万——这一数字超过了人手一部的数量。
应用推荐