• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: JNDI/LDAP multi-value attributes just work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JNDI/LDAP multi-value attributes just work


  • Subject: Re: JNDI/LDAP multi-value attributes just work
  • From: Karl Moskowski <email@hidden>
  • Date: Tue, 8 Feb 2005 07:37:20 -0500

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
  • Follow-Ups:
    • Re: JNDI/LDAP multi-value attributes just work
      • From: Siegfried MAKEDANZ <email@hidden>
References: 
 >Re: JNDI/LDAP multi-value attributes just work (From: Karl Moskowski <email@hidden>)
 >Re: JNDI/LDAP multi-value attributes just work (From: Siegfried MAKEDANZ <email@hidden>)

  • Prev by Date: POP Mail - Read Subject, Body, From
  • Next by Date: Re: POP Mail - Read Subject, Body, From
  • Previous by thread: Re: JNDI/LDAP multi-value attributes just work
  • Next by thread: Re: JNDI/LDAP multi-value attributes just work
  • Index(es):
    • Date
    • Thread