ruby_odata icon indicating copy to clipboard operation
ruby_odata copied to clipboard

Executing multiple services

Open emilekukkuk opened this issue 8 years ago • 8 comments

I have an issue where I need to extract data from two different URL's for the same company.

Calling a new service, sending the service name and executing the query works fine for the first URL.

When running a second one ( With a new URL ), the execute method tries to retrieve the data still from the first URL, although the field names are now different in the 2nd one.

/usr/local/rvm/gems/ruby-2.4.0/gems/ruby_odata-0.1.0/lib/ruby_odata/service.rb:376:in block in entry_to_class': undefined method INSite_Formulaa0129565ae50e71181a00aec8e401db6=' for #NSco:0x000000033b0cd8 (NoMethodError)

I suspect it's to do with the dynamic creation of the instance variables via the instance_variable_names method.

When checking the edmx for both, they are indeed different.

Any suggestions to get this working? Thanks.

emilekukkuk avatar Jun 22 '17 10:06 emilekukkuk

Thanks for reporting this bug. I'll check it out today.

visoft avatar Jun 22 '17 10:06 visoft

Thank you very much!

emilekukkuk avatar Jun 22 '17 10:06 emilekukkuk

@emilekukkuk Does this happen with the current version in the develop branch?

visoft avatar Jun 25 '17 23:06 visoft

I checked in a spec for this in the develop branch.

visoft avatar Aug 05 '17 23:08 visoft

Thank you so much. Sorry I haven't checked in a for while. Was in a hurry and used another component.

I'll see if I can test the new commit.

emilekukkuk avatar Aug 07 '17 05:08 emilekukkuk

Is this fixed in any of the versions > 0.1.0 ?

karolkulesza avatar Aug 21 '20 14:08 karolkulesza

@karolkulesza - Check the develop branch out, it should have changes for this

visoft avatar Aug 21 '20 14:08 visoft

@visoft : Thanks for the feedback.

Unfortunately, using the latest version from develop I have the same issue, still.

karolkulesza avatar Aug 24 '20 09:08 karolkulesza