[libRETS-users] AddAllObjects vs. AddObject(<entity>,objID)

Matt Lavallee matt at pmptechnology.com
Wed Jun 6 10:50:23 CDT 2007


On  Wednesday, June 06, 2007 at 10:23 AM, Keith T. Garner wrote:

> On 6/6/07 8:52 AM, Matt Lavallee wrote:
> > Now, today, I’ve found that sometimes this /isn’t/ working: the
> > server (Variman 2.1.9) returns “No Object Found” with the
> > following POST:
> >
> > ID=<LN>:<ordinal>&Location=0&Resource=Property&Type=Photo
> 
> Could that have been a transitory issue?  I could see that cropping up if
> the photo is on a file share that went missing when you did the call.

I considered the same, but it's repeatable for the listings affected and, as covered below, works with AddAllObjects (so it has to be a data handling issue rather than file handling).

> > However, if I use AddAllObjects, I do get all of the photos, but I have
> > no way of knowing whether I’m preserving the original order or not
> > because I’ve lost the ordinals.
> 
> I have no idea why you're seeing that behavior.  It could be a
> misconfiguration on their side.

A-men.  But how so?  How could it only affect a very small percentage of listings?  Know what I mean?

> > To top it off, I honestly don’t understand how these objectIDs are
> > relating back to the resource (and metadata is no help), because the
> > AddAllObjects call creates the following POST data:
> 
> Other than the the first part of the ID, which, as you know, maps to the
> KeyField of that particualr resource, the Object-ID doesn't map back to the
> the data in the Resource in any meaningful way.

Yeah, that's basically what I found. I was hoping that there were some "secret" ObjectID field somewhere. :)

> > ID=<LN>:1:*&Location=0&Resource=Property&Type=Photo
> 
> If you look at section 5.3 of the RETS spec (I'm looking at the 1.5 spec)
> you're building an object list.  You're asking for object 1, and then all
> objects.  I'll have to look at the code to see why we're doing 1:* instead
> of just *.

Of course I didn't check the spec. ;)  I was interpreting the two different calls, but now it seems that the :1:* is questionable anyway.

> > Notice that the * seems to be a child object of (what I previously
> > thought of as) Object #1 for <LN>.
> 
> Nope, its the second element in a list.

Got it.

> > If this is the case, then why do the
> > AddObject(<LN>,<ordinal>) calls work at all?
> 
> Let's say you did three AddObjects in a row with 3, 6, and 7, your ID would
> look like ID=<LN>:3:6:7
> 
> Or did I misunderstand the question?

Nope, that makes sense... I just don't like how the spec usually says that the server can return data in any order and doesn't need to be consistent between calls.  At least if I'm using the index, I know I'll get the same object every time... that is, when it works. :)

My suspicion is that the ObjectID is being incremented behind the scenes for one reason or another.  Unfortunately, there is no way for me to find out what ObjectIDs are available for the resource/entity.  *grumble*

-Matt





More information about the libRETS-users mailing list