Hi,
I have a simple project with a jmix backend and a jmix frontend, I used restApi addon and restDataStore.
I have setup my model like this. I have some “theme” that contains 1 or * “card”.
I have setup my composition in the client like this :
@JmixEntity
public class Theme {
@JmixGeneratedValue
@JmixId
private UUID id;
@InstanceName
private String themeName;
@NotNull
private FileRef themeImage;
@Composition(inverse = "theme")
private List<Card> cards;
and setup in backend fetchplan
<fetchPlans xmlns="http://jmix.io/schema/core/fetch-plans">
<fetchPlan class="fr.utbm.crunch.playandpulsemanager.entity.Card" name="card-with-theme" extends="_base">
<property name="theme" fetchPlan="_base"/>
</fetchPlan>
<fetchPlan class="fr.utbm.crunch.playandpulsemanager.entity.Theme" name="theme-with-card" extends="_base">
<property name="cards" fetchPlan="_base"/>
</fetchPlan>
</fetchPlans>
and fetchplan in client
<fetchPlans xmlns="http://jmix.io/schema/core/fetch-plans">
<fetchPlan class="fr.utbm.crunch.playandpulseplayer.entity.Card" name="card-with-theme" extends="_base">
<property name="theme" fetchPlan="_base"/>
</fetchPlan>
<fetchPlan class="fr.utbm.crunch.playandpulseplayer.entity.Theme" name="theme-with-card" extends="_base">
<property name="cards" fetchPlan="_base"/>
</fetchPlan>
</fetchPlans>
But when I get Themes, cards was not fetch.
Hi setup collection like this
<collection id="themesDc" class="fr.utbm.crunch.playandpulseplayer.entity.Theme" fetchPlan="theme-with-card">
<fetchPlan extends="theme-with-card" />
<loader id="themesDl" readOnly="true">
</loader>
</collection>
Cards are always null, What I’m doing wrong ?
Best regards
Alexandre