• 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: Updating EOObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updating EOObjects


  • Subject: Re: Updating EOObjects
  • From: Jonathan Miller <email@hidden>
  • Date: Thu, 18 Aug 2005 11:43:46 -1000

Chuck-

Thanks for the quick response.

I guess I'm still stuck in an old mind site and I'm "trying" to explain it as my brain understands it.  Having said that I'm leaving everything up to WebObjects and I'm letting EO do all the magic.

I have an entity that is called License.  License has a relationship to another entity called Products and another relationship to an entity called Principals (each relationship is two way and are created by using EOModeler).    When a license object is added all the values representing a license object are there.  However when I display the license objects from a search I can see that the new license object exists however the information from the relationship's doesn't appear.

The search returns a WODisplayGroup and it iterates a license object.  I reconstruct both those objects before doing the search (see code below).  There is another action that occurs after the license is created that emails the license to a user.  I can see from that action that the information from the relationship does not there appear as well.

Thanks for your humor and help.

Johnny.

p.s. I don't think this helps but here is the code from the search action:

    public WOComponent licenseSearch()
    {
        StringBuffer sb = new StringBuffer();
        aLicense = new License();
        searchGroup = new WODisplayGroup();

        if(selectedField.equals("Username")) {
            sb.append("principalid");
        } else {
            sb.append("principals.company");
        }

        

        if(selectedQualifier.equals("IS")) {
            sb.append(" =  %s");
        }else if(selectedQualifier.equals("LIKE")) {
            sb.append(" caseInsensitiveLike %@");
            searchString = searchString + "*";
        }

        

        EOQualifier eq = EOQualifier.qualifierWithQualifierFormat(sb.toString(), new NSArray(new Object[] {searchString}));
        searchGroup.setObjectArray(aLicense.searchLicenses(eq, ec));
        setPageKey("VL");
        return null;
    }  

On Aug 18, 2005, at 11:25 AM, Chuck Hill wrote:


On Aug 18, 2005, at 2:14 PM, Jonathan Miller wrote:


    I have a two step form where the first step represents information in one table and the second step represents information in a second table.  The two tables share a relationship where table one's Primary key is a foreign key in table 2.


Tables?  Primary keys?  What is that?  We don't use those words in polite company here, those are dirty little implementation details best left in the dark corner of the closet.  You have one instance (object) each of two entities (classes).  Object A knows about (has a relationship to Object B.  Does Object B know about Object A?



    I am able to properly insert both sets of information into their respective tables.


That is EOF's job.  Insert into tables?  Who worries about low level details like that?



However when I go to view the information from inside a web page the information that should be displayed through the relationship does not appear.


Well, OK.  Probably you have done something wrong.  How are you creating the two objects?  How are you establishing the relationship between them (telling A about B and / or B about A)?  What does  your code look like?



  What is even more confusing is when I rebuild the project the information that didn't appear before appears now.  I've tried reconstructing all my objects (i.e. the display group, the entity objects etc...) but that doesn't seem to help.


Sounds like you are relating the objects incorrectly.  You are not actually, shudder, touching primary keys with your bare hands, are you?

Chuck

(only slightly in jest)


-- 
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects






 _______________________________________________
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

References: 
 >Updating EOObjects (From: Jonathan Miller <email@hidden>)
 >Re: Updating EOObjects (From: Chuck Hill <email@hidden>)

  • Prev by Date: EOQualifier timestamp comparison help
  • Next by Date: Re: Updating EOObjects
  • Previous by thread: Re: Updating EOObjects
  • Next by thread: Re: Updating EOObjects
  • Index(es):
    • Date
    • Thread