• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Using a Single inheritance table for relations between entities
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using a Single inheritance table for relations between entities


  • Subject: Using a Single inheritance table for relations between entities
  • From: Comm unity <email@hidden>
  • Date: Wed, 13 Nov 2013 10:55:54 +0100

Hello everybody,
I have a problem with using different single inheritance tables for relations between entities. I followed this guide to create the Entities:http://wiki.wocommunity.org/display/documentation/Modeling+Inheritance+with+Entity+Modeler

I have for different Entities. Person, AbstractRelation, ConcreteRelation1, ConcreteRelation2.

ConcreteRelation1 and ConcreteRelation2 are Subentities from AbstractRelation.

AbstractRelation has the following form:
id_person1 | id_person2 | type

For the sub entities I create the following qualifiers:
ConcreteRelation1: type=concrete_type_1
ConcreteRelation2: type=concrete_type_2

With these concrete relation entities, I modeled two 1:n Relations between Persons, lets call it relation1 and relation2, and I flattended these Relations to get the persons in the code, lets call it persons1 and persons2.

Now the Problem. 
I have three entries in my corresponding AbstractRelation table

id_person1 | id_person2 | type
1 | 2 | concrete_type_1
1 | 3 | concrete_type_1
1 | 4 | concrete_type_2

Accessing the relations from the person 1 works fine.

for example person.relation1() returns the two ConcreteRelation1 Objects. But if I want to get the corresponding persons to this relation, by calling person.persons1() returns every persons in this table.

I checked the generated SQL-Statements.
If I call person.relation1() the qualifier type = concrete_type_1 was used, but if I call person.persons1() the qualifier was not used. I tried to find a solution, with no success...

Anyone have an idea?

Thanks

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Postgresql connection issue
  • Next by Date: Edit url for WO application
  • Previous by thread: WebObjects benchmarks
  • Next by thread: Edit url for WO application
  • Index(es):
    • Date
    • Thread