Hello everyone! Regarding a question I did last we...
# general
m
Hello everyone! Regarding a question I did last week about a many-to-may relationship, I have a doubt about this relationship when you have one-to-many and many-yo-many relations. With a scenario like this:
Copy code
class One {
    static hasMany = [twos: Two]
}
Copy code
class Two {
    static belongsTo = [anotherEntity: AnotherEntity, one: One]
    static hasMany = [ones: One]
}
This is possible, but imagine that you want to the
belongsTo
One
relation without name, as:
Copy code
static belongsTo = [anotherEntity: AnotherEntity, One]
This is not possible because you cannot have these two arguments at the same time. So if you want to have something like this, is always needed to have the two relation with name, right?