In the RETS implementation where I am (North Texas) the field in the property tables is UID that matches up with a field TABLEUID in the media tables.
From the NTREIS documentation:
Every listing has a MLS Number and UID in the Property Class. The UID in each Property Class links to the TableUID in the Media class. In addition, there is a UID in the Media class.
The MEDIA UID does not link to the UID in the Property Classes.
The TABLEUID in the MEDIA Class links to the UID in each Property Class.
How to get this module to use the tableuid from the media class and link it to the UID field in the property class??
Where in the code is this done?
Comments
Comment #1
camidoo commentedhave you tried setting the 'key field' to the UID in the class configuration?
Comment #2
markusa commentedYes in the property classes property types I have the key field set to UID.
Do I need to create a property type based on the MEDIA class and download the media records separately? Would I then use the TableID as the key for that type?
How or when does this module get the images?
Comment #3
camidoo commentedno, there's no need to create a property type based on the media class, typically the images are stored based on the key field for the listings, however it seems like this is not so in your case, but not sure.
The images are downloaded when you add a mapping in the class configuration, in order to have that option available you need to add an image field to the property type associated with that class. At that point you can select to process images and which object type to download.
Comment #4
markusa commentedYes I have that set
I have a PHOTODATE field for the timestamp....I have created an image field with unlimited values and selected that....I have two options for the object type...Hi-Res and Low-Res....got the process images checkbox checked.....
I am downloading in batches of 25 but I have no memory errors or errors of any kind....I don't believe any photos are downloading.
Basically I need to alter your code to provide an option for the field which to compare to the key in the "Required fields" settings.
Can you give me any pointers? What file is it? What line does it start?
Can I just hard-code it to compare TableUID with the UID in the property class?
Comment #5
markusa commentedIf you don't believe me then here is the NTREIS media documentation page:
http://www.ntreis.net/documents/NTREISRETS_332008122558.htm
Comment #6
camidoo commentedaccording to the RETS standard, the getObject transaction has to operate on the key field of the resource type requested, in this case it's the property resource, so i'm not sure where the media class comes into play at all, the 'key field' should suffice and allow the images to download.
can you login to http://www.retsmd.com click on any class in the property resource section and then when the fields load, look in the header of that table and see what field it has listed for Key Field. Then ensure that is the field you have selected in the configuration for that class in drealty.
It's going to be a bigger task to modify the code to reference a value from another class that isn't even downloaded, not sure that would be the right approach, however the code for processing the images is in drealty.daemon.php in a function called process_images(). That would be where to start.
If you like hit me up on my d.o contact thing and i might be able to help figure this out offline as i'd need to basically setup your feed local and see if i can come up with a workaround or something, or maybe even get it working correctly.
NTREIS uses InnoVia and i've setup a few feeds off the InnoVia system before, not sure if NTREIS has a different implementation, but it wouldn't surprise me.
Comment #7
markusa commentedI had used the PIRETS module before and it worked with the NTREIS system....Your module is much better though for everything else not to mention it is for 7.x
Maybe I can create a tableuid field that is autopopulated by the UID field?? Would that work you think?
Comment #8
markusa commentedHmmm so something else could be wrong? I am at loggerheads.
Comment #9
markusa commentedShould the UID field be a text field or a integer field?
Comment #10
markusa commentedI had had a field in my property type mapped to the UID field which I had set has the key......when i ran the drush rets-import no mention of images was ever made....now it goes through and says no images found for each one after all the entities are saved.....thought I had it there. ugh....
Comment #11
markusa commentedI AM SUCH AN IDIOT!!!!! To all that come after....read your freakin RETS documentation.
I got it dude....the getObject lookup field was the MLSNUM....I am such a dufus.
Thanks sorry for wasting your time
Comment #12
markusa commented