• 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
Re: Building a relationship qualifier
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building a relationship qualifier


  • Subject: Re: Building a relationship qualifier
  • From: Rajeev Malhotra <email@hidden>
  • Date: Sun, 19 Jan 2003 07:44:30 -0500

Thankyou Art for answering.

Your model should have Department.employees and Employee.department relationships. Whether both of these is marked as a class property depends on whether you will need to access both of them in your code.

I'm not certain whether testing for Department.employees being not null would work because I don't know without setting up a simple test whether an empty to-many relationship is an empty NSArray or null. So this qualifier placed on a Department fetch would be "employees != null".

It's always instructive to watch the SQL being generated to determine whether it's correct. To do this, add "-EOAdaptorDebugEnabled true" to WO app's launch flags. This should be set in any WO app that accesses a database both to check SQL correctness and to look for unnecessary database accesses, frequently due to eomodel problems.

That is the first thing I tried, I built the qualifier with "employees != null". But did not help.


My department primary key = departmentId and the foreignKey inside employees is also department id. When the qualifier was constructed for employees != null. It created a SQL where it was checking for

t0.departmentId != null where t0 is the department, which does not help.

I got a response from one person saying that there was a way to set up a count using @count but I could not find any documentation for it.

Thanks,
Raj
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Building a relationship qualifier
  • Next by Date: IntelliJ EAP
  • Previous by thread: Re: Building a relationship qualifier
  • Next by thread: Re: EOF 2.2 Version For Openstep 4.2
  • Index(es):
    • Date
    • Thread