cancel
Showing results for 
Search instead for 
Did you mean: 

do not keep source when use expand parameter

Former Member
0 Kudos

Hi experts,

I am facing an issue that I can't figure out.

I will try to simplify my problem to make it understandable:

I have three entities, demand, position and grappe.

You can find the graph in attached file

Demand's table is stored in a real database, when position and grappe are stored in a cluster database. The id of the cluster is saved in demand.

I can't have a direct access to the positions because I need to know the id of the cluster, so all my URL are build this way :

.../DemandSet('0')/PositionSet

.../DemandSet('0')/GrappeSet

.../DemandSet('0')/PositionSet('0')/Grappe etc

But when I call ".../DemandSet('0')/PositionSet('0')?$expand=Grappe, it called the method GrappeSet_GetEntity but the source is Position and not demand. If I do not have the parameter of Demand, do not have the id of the cluster and then I cannot access my data.


Really appreciate your help !


Please let me know if you need more information from me.

Accepted Solutions (1)

Accepted Solutions (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Travaux,

With the URL /DemandSet('0')/PositionSet('0')?$expand=Grappe, i see you are mixing both Data Provider Expand and Frame Work Expand in a single URL.


I would Suggest to implement Data Provider Expand alone and accomplish it.


Like  ->


/DemandSet('500000005')?$expand=DemandToPosition/PositionToGrappe


Implement Get_Expand_Entity method of your DPC_EXT class and Get the Position ID from the Demand ID. Now then get Grappe data based on Both the above Position & Demand ID's.


Fill these data inside a Deep Structure Correctly and send as GW Response.


Check this for technical help ->



Regards,

Ashwin


Former Member
0 Kudos

Hi,

Thanks for your proposale.

I just try what you ask, but I get the same probleme : It call the function GrappeSet_GetEntity with the IV_SOURCE_NAME = Position and not Demande

Regards

AshwinDutt
Active Contributor
0 Kudos

Hello Travaux,

Did you implement Expand_Entity Method of your DPC_EXT class ? do not use the proposed URL directly with the existing set up. It will not work as expected.

Add the code as i suggested and then test.

Regards,

Ashwin

Answers (0)