Re: Derived attribute problem
Re: Derived attribute problem
- Subject: Re: Derived attribute problem
- From: Ângelo Andrade Cirino <email@hidden>
- Date: Sun, 23 Mar 2014 12:58:34 -0300
Hi Aaron,
Thank you for your prompt answer. Unfortunately none of the suggestions worked.
1) I can't find any combination of double or single apostrophe that will work. A similar MySQL SELECT statement is as simple as this
select Party.id as partyID, (case status
when 0 then 'Active'
when 1 then 'Inactive'
end) as fullStatus from Party;
Even this simple derived attribute that returns a constant won't work (from the plist entity file):
{
columnName = fullStatus;
definition = "'Full Status'";
name = fullStatus;
prototypeName = varchar16;
},
with the following error:
IllegalStateException: sqlStringForAttribute: attempt to generate SQL for attribute 'fullStatus' on entity 'Party' with undefined column name. You must define a column name for this attribute before attempting a database operation.
2) The read format option didn't work either since the attribute is an integer number and the return value is a string. I attempted this format:
if(%P,'Active','Inactive')
_______________________________________________
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