Traversing Multiple Join Tables: More Info
Traversing Multiple Join Tables: More Info
- Subject: Traversing Multiple Join Tables: More Info
- From: Lucas Haley <email@hidden>
- Date: Mon, 12 Jul 2004 19:50:04 -0700
Hello --
I thought I might clarify this a little. My tables looks something like:
Table A = Employee
Table B = Skills, includes a "softwareId" field
Table C = Software
Table AB = EmployeeSkills, includes a "yearsKnown" field
Table AC = EmployeeSoftware, includes a "version" field
In my problem, I have the WORep in the Employee page, listing the
skills known by that employee; like so:
employee name
----------------------
Skill Name...................................Years
Known.......................Software Name..............Using Version
So I bind my WORep to the employee's EmployeeSkills table, and the item
to an individual EmployeeSkill. To get the version number, I can
traverse back to Employee, and then over to EmployeeSoftware. But I end
up with an array of EmployeeSoftwares, and multiple versions. I would
need to limit the EmployeeSoftwares array by using the softwareId field
from the Skills table.
I can think of a couple of hypothetical solutions:
1) in the employeeskills.java EOGenericRecord subclass, i can make a
method that performs an EOFetchSpecification or raw SQL call to get the
version field.
2) Make the EmployeeSkills.java WOBuilder interface grab all of the
EmployeeSoftware rows, and somehow match it up with the item
EmployeeSkill.
But not only do I not really know how to do either, I dont know if it
even makes sense.
Any help greatly appreciated!
-Lucas
Portland, OR
_______________________________________________
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.