Creating complex qualifiers
Creating complex qualifiers
- Subject: Creating complex qualifiers
- From: "Catarina Simoes" <email@hidden>
- Date: Tue, 21 Oct 2008 17:27:46 +0100
Hi List,
In the project I'm working on I'm trying to refactor some old code that uses EOSQLQualifier.
I'd like to move on from EOSQLQualifier, not only because it's deprecated but the string arguments are quite a mess and error prone.
The sql statement generated by the fetch specification and the EOSQLQualifier is something like:
(row1 + row2) / 100 >= value
The code to create the qualifier is:
String format = "(%A + %A) / 100 > = %@";
String args = new Object[] {entityProperty1, entityProperty2, value};
EOQualifier qualifier = new EOSQLQualifier(entity, format, args );
The variables entityProperty1 and entityProperty2 are entity properties (attributes or relationship key paths).
Basically I want to create complex qualifiers not restricted to single attributes or relationships but involving arithmetic operations between them.
Has anyone done something like this?
BTW, the app is WO 5.2.3 and is not using Project Wonder.
Thank you in advance.
Best regards,
Catarina
_______________________________________________
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