• 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
ObjectNotAvailableException: when saving a simple relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ObjectNotAvailableException: when saving a simple relationship


  • Subject: ObjectNotAvailableException: when saving a simple relationship
  • From: Gustavo Pizano <email@hidden>
  • Date: Thu, 16 Jul 2009 09:40:40 +0200

Hello all.

Ok this is really simple but somehow its not working.

I have a list of EO's (TRANSLATIONSET) in a WOBrowser, I have multiple selections to ture and with their proper bindings, also I have a WOpopUpButton that displays a list of USERS, item : USER and selection= selectedUser<USER>. now I have and AjaxSubmitButton that forward the information to a static methihod in the Administrator tools <WOComponent> so this is what Im doing in .

in the WOComponent that has the List of TRANSLATIONSETS
   
    public WOActionResults asingToTranslator() {   
       
        return AdminTools.asingToTranslator(session().defaultEditingContext(),selectedList,userSelection);
    }

in the AdministratorTools:

    public static WOActionResults asingToTranslator(EOEditingContext ec, NSArray<TRANSLATIONSET> selectedTrans, USER user) {
        NSLog.out.appendln(">>>asingToTranslator>> HERE HERE HERE");
        NSLog.out.appendln(ec.globalIDForObject(user));
        NSLog.out.appendln(selectedTrans.size());
     
       
        for(TRANSLATIONSET ts:selectedTrans){
            ec.insertObject(ts);
            ts.setToUserRelationship(user);           
        }
       
        ec.saveChanges();
       
        return null;
    }

when I set the relationship ts.setToUserRelationShip(user) I got the exception.. I tought that the slectedUser wasn't inserted in the EC, so then I add the folloing before the for-loop.   USER userAux = USER.fetchUSER(ec,USER.NAME.eq(user.name()));

and instead of argument user I passed userAux.  but still I have the same ObjectNotAvailableException: No xws.localizer.eo.USER found with globalID: <USER: [id: '0'] >.


why is this happening?


Thx

G.
 _______________________________________________
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: ObjectNotAvailableException: when saving a simple relationship
      • From: Lachlan Deck <email@hidden>
  • Prev by Date: Date formatter with support for ordinal date suffix?
  • Next by Date: Antw: New job position in Switzerland
  • Previous by thread: Re: Date formatter with support for ordinal date suffix?
  • Next by thread: Re: ObjectNotAvailableException: when saving a simple relationship
  • Index(es):
    • Date
    • Thread