Re: JNDI/LDAP multi-value attributes just work
Re: JNDI/LDAP multi-value attributes just work
- Subject: Re: JNDI/LDAP multi-value attributes just work
- From: Siegfried MAKEDANZ <email@hidden>
- Date: Tue, 08 Feb 2005 14:11:54 +0100
Karl,
the eomodel is unchanged, I only modified the class files I generated
with the Modeler. I do not get any error messages. It probably needs a
WO beginner to try this :-) .
BTW: WO is a great tool.
regards,
Siegfried
Karl Moskowski wrote:
Siegfried,
So, in your eomodel, the Value Class (Java) is still set to String,
but in your Java class for the EO you manually changed the type to
NSArray? I don't think I've ever heard of that being done. Don't you
get weirdness, e.g., a ClassCastException?
--Karl.
On 8-Feb-05, at 3:15 AM, Siegfried MAKEDANZ wrote:
Karl,
I did not use EOModeler to do the modifications in the class
definition, I did in the editor (Xcode in my case):
public String awiPersonAccounts() {
return (String)storedValueForKey("awiPersonAccounts");
}
public void setAwiPersonAccounts(String value) {
takeStoredValueForKey(value, "awiPersonAccounts");
}
to
public NSArray awiPersonAccounts() {
return (NSArray)storedValueForKey("awiPersonAccounts");
}
public void setAwiPersonAccounts(NSArray value) {
takeStoredValueForKey(value, "awiPersonAccounts");
}
Then writing works with null, one or more than one values. I have not
yet tested the reading. In the method that does the writing to the
directory I get the EC from the session, insert my new object into it
and save the changes and the new entry turns up in the directory:
EOEditingContext ec = session().defaultEditingContext();
ec.insertObject(anAwiPerson);
ec.saveChanges();
As uid is a multi-value attribute this should work accordingly.
regards,
Siegfried
Karl Moskowski wrote:
Siegfried,
I tried changing my eomodel so the uid attribute is a NSArray
(instead of String), and EOModeler gave these warnings:
Attribute uid in Entity InetOrgPerson has a valueClassName of
NSArray, but it doesn't have a valueFactoryMethodName.
Attribute uid in Entity InetOrgPerson has a valueClassName of
NSArray, but it doesn't have a adaptorValueConversionMethodName.
What did you use for the two methods? How did you handle settter
methods for your "arrayed" attributes?
_______________________________________________
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