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

Matt Lavallee matt at pmptechnology.com
Wed Jun 6 08:52:48 CDT 2007


Hi Keith, et al.,

 

I just ran into an odd situation this morning with the Photo objects on the
Property resource.  Our MLS stores photos with the following convention:

 

<LN>.jpg

<LN>_<ordinal n>.jpg

 

>From the Property+Class, I get a photo count which usually allows me to loop
through GetObject(<LN>,<ordinal>) on the Property resource to maintain the same
incremental counts that they use – this is working for 99% of the listings.

 

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

 

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.

 

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:

 

ID=<LN>:1:*&Location=0&Resource=Property&Type=Photo

 

Notice that the * seems to be a child object of (what I previously thought of
as) Object #1 for <LN>.  If this is the case, then why do the
AddObject(<LN>,<ordinal>) calls work at all?

 

Thanks for any insight.

 

Newly confused,

-Matt

 


 <http://www.pmptechnology.com/> pmpt_logo

PMPTechnology.com

Matt Lavallee
VP, Web Services

phone: 630-598-2344 
fax: 630-982-6641

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.crt.realtors.org/pipermail/librets-users/attachments/20070606/deb3c692/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1535 bytes
Desc: not available
Url : http://mail.crt.realtors.org/pipermail/librets-users/attachments/20070606/deb3c692/attachment.gif 


More information about the libRETS-users mailing list