Skip to Content
0
Former Member
Mar 13, 2014 at 01:37 PM

Association/navigation not filling Key field

918 Views

Hi all,

I have a very simple data model but I can't get my head around the association part...

I have simplified:

ENTITY_1

- KEY

- DESCRIPTION

ENTITY_2

- SOME_OTHER_KEY_FIELD

- NAME

- KEY (foreign key to ENTITY_1)

I created the association between ENTITY_1 and ENTITY_2 as following:

Name: "Get_my_Entity_1"

Principal Entity: ENTITY_1

Prinicpal Card.: 1

Dependent Entity: ENTITY_2

Dependent Card.: 1

Referential Constraints: ENTITY_1-KEY = ENTITY_2-KEY

as well as...

Name: "All_my_Entity_2s"

Principal Entity: ENTITY_1

Prinicpal Card.: 1

Dependent Entity: ENTITY_2

Dependent Card.: M

Referential Constraints: ENTITY_1-KEY = ENTITY_2-KEY

I added the navigations properties accordingly: ENTITY_1 received "All_my_Entity_2s" and ENTITY_2 "Get_my_Entity_1".

Now doing some GET options:

.../ENTITY_1Set(1)

Gives me my ENTITY_1 with KEY = 1 and the corresponding description. Nice.

.../ENTITY_1Set(1)/All_my_Entity_2s

Gives me back a collection of ENTITY_2. Nice.

BUT the other way around won't work.

.../ENTITY_2Set('X')

Gives me my ENTITY_2 with SOME_OTHER_KEY_FIELD = 'X' and also it fills KEY = 1. Nice.

.../ENTITY_2Set('X')/Get_my_Entity_1

This doesn't work.

In the debbuger, I get to the "GET_ENTITY" method of ENTITY_1 but the only key fields that are filled in are the ones from ENTITY_2. o.O

Now how should that help to navigate?

Am I doing something wrong or is this a bug?

Thanks for any input.

Best,

Melanie