Skip to Content
author's profile photo Former Member
Former Member

XSODATA many to many association with combined primary key

Hi everybody,

i have two tables and a view:

- the view Offers with the primary key "FLEXID"

- the table ChargingOrders with the primary key "LAID"

- the table FlexibilityOffers with the combined primary key "FLEXID" and "LAID"

One Order can be associated to many Offers and an Offer consists of many Orders, but i am not able to get this working in my .xsodata file. The corresponding lines are the following:

service namespace "" { 
    "A627603"."FLEXIBILITAETSANGEBOTE" as "FlexibilityOffers";
    "A627603"."LADEAUFTRAEGE" as "ChargingOrders";
    "" as "Offers" key ("FLEXID") navigates ("OfferChargingOrderAllocation" as "offerOrderAl");
    association "OfferChargingOrderAllocation" principal "Offers"("FLEXID") multiplicity "*" dependent "ChargingOrders"("LAID") multiplicity "*" over "FlexibilityOffers" principal ("FLEXID") dependent ("LAID");

But i am always getting "Invalid association table name "FlexibilityOffers". If i try to set the table directly, i am getting a syntax error.

Best regards,


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 17, 2016 at 10:19 AM

    Hello Tobias,

    to my knowledge the "over" keyword cannot handle alias names defined in the service, catalog object names (like yours in format "schema"."table") and synonyms.

    The only working way (at least for me) is to use a repository artifact (e.g. a table defined via .hdbtable or hdbdd/hdbcds).



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.