Hi! I’m having an issue with relationships in my form.
I have a resource with a form based on my Inscription model.
In this model, I have one student belongTo(Student::class) relationship.
In my Student model, I have two relationships:
AAAs → hasMany(AAA::class)
BBBs → hasMany(BBB::class)
In my form, I have fields like this:
Group::make()
->relationship("student")
->schema([
Repeater::make("AAAs")
->relationship()
...
and later:
/* OK */
Group::make()
->relationship("student")
->schema([
Repeater::make("BBBs")
->relationship()
...
The BBBs repeater displays its data correctly, but the AAAs repeater shows nothing.
However, when I move the AAAs repeater into the same Group as the BBBs one, it works:
/* OK */
Group::make()
->relationship("student")
->schema([
Repeater::make("AAAs")
->relationship()
...
Repeater::make("BBBs")
->relationship()
...
I don’t understand why I can’t have them in separate groups.
if i move AAAs repeater Group after BBBs repeater Group, AAAs is working but BBBs dont anymore ...
/* NOT OK */
Group::make()
->relationship("student")
->schema([
Repeater::make("BBBs")
->relationship()
...
/* OK */
Group::make()
->relationship("student")
->schema([
Repeater::make("AAAs")
->relationship()
...
If anyone has an idea...