path to filter a relationship
path to filter a relationship
- Subject: path to filter a relationship
- From: Theodore Petrosky <email@hidden>
- Date: Tue, 06 Sep 2011 07:07:07 -0700 (PDT)
sorry i couldn't think of a better subject line
I have some tables with relationships:
Employee
EmploymentStatus
EmploymentTitle
Employee to one EmploymentTitle
Employee to one employee EmploymentStatus
so I created a repetition with
<webobject name = "TitleTable">
<br/>
<wo:WOString value = "$theEmploymentTitle.employmentTitle"/> <br/>
<webobject name = "EmployeeListTable">
<webobject name = "EmployeeMDO"/>
</webobject>
</webobject>
TitleTable: ERXTable {
list = theEmploymentTitleList;
item = theEmploymentTitle;
}
EmployeeListTable : ERXTable {
list = theEmploymentTitle.employees;
item = theEmployee;
maxColumns = "4";
goingVertically = "true";
tableWidth = "800";
}
I realize that I could use unordered lists for some of this however I can not seem to figure out how to display only current employees because isCurrent is in the EmploymentStatus table. Originally (before I wanted to shoe the job titles) the list was created in code:
setEmployeeList(Employee.fetchEmployees(theEC, Employee.EMPLOYMENT_STATUS.dot(EmploymentStatus.IS_CURRENT).eq(true), Employee.LAST_NAME.ascs()));
theEmploymentTitleList = EmploymentTitle.fetchEmploymentTitles(theEC, EmploymentTitle.IS_CURRENT.eq(true), null);
Even if isCurrent lives in Employee, how do I get the inside loop to give me only current employees for the employment title?
As I examined EOModeler, I thought maybe I could subclass Employee and create a CurrentEmployee with a qualifier. But creating a subclass does not create the appropriate .java files so how do I tell my app that it exists. And maybe this isn't the right way to do this anyway.
maybe i am thinking way too hard on this.
_______________________________________________
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