Reverse Retrieve over Association Self-Reference

0
Dear all, I am trying to implement this bit of code: This is outlined in the Mendix documentation. I want to reverse retrieve over a 1-* reference (from cache), but I am getting this error log below; does anyone have any experience with this? I have tried completely rebuilding the model in the documentation (Module Main, with two entities “Generalization” and “Specialization” and it still does not work. I understand from the Java documentation that Java is not able to find a Main.Specialization_Generalization key in its cache? Is there anything that has been left out in the documentation? Thanks for thinking along beforehand! Best regards, Wouter          Error Log:   Buildfile: C:\Users\-\Documents\Mendix\-\deployment\build_core.xml compile:     [javac] Compiling 2 source files to C:\Users\-\Documents\Mendix\-main\deployment\run\bin     [javac] C:\Users\-\Documents\Mendix\--main\javasource\main\actions\Java_action.java:35: error: cannot find symbol     [javac]         return Core.retrieveByPath(getContext(), __Specialization, "Main.Generalization_Specialization", Reverse);     [javac]                ^     [javac]   symbol:   variable Core     [javac]   location: class Java_action     [javac] 1 error BUILD FAILED….
asked
3 answers
1

It looks like you haven’t imported the Core at the start of your Java Action. Try adding this

import com.mendix.core.Core;

 

answered
1

Hi Wouter,

XPath retrieves be definition are data base retrieves, so not cache is available.

Not sure how to solve the problem

Cheers, Andries

 

answered
0

The problem here is that the “Main.Generalization_Specialization” bit is not recognised; I have scoured the forum and found several instances where similar code is used… So I am guessing I am doing something wrong? Maybe due to Mendix 8.10? New Java?

answered