Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.0
-
Fix Version/s: 1.0.2
-
Component/s: Persistence
-
Labels:None
Description
This is my domain class:
class Category
{
String name
Set items
Category parentCategory
Set subCategories
static hasMany = [subCategories: Category, items: Item]
static belongsTo = [parentCategory: Category]
static constraints =
{
parentCategory(nullable: true)
name(nullable: true)
}
}
I'd like when I delete a category, that the children are deleted, not the parents (which seems fairly natural with this belongsTo). However the contrary happens. If I remove the belongsTo, then there is no cascade at all which is still not the behaviour I want.
I guess this bug happens because both end of the relationship belong to the same class.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
Bulk closing bunch of resolved issues