progress / JSDO

Client side TypeScript library to access Progress® Data Object Services
Other
23 stars 27 forks source link

Why is defaultTableRef null when more than one tables are present? #278

Open W1nstar opened 4 years ago

W1nstar commented 4 years ago

I'm having issues trying to read a catalog with more than one table, using the fill function. For some reason, it needs me to specify the tableRef. I don't know wich one it is, and it wouldn't be good for me to hardcode on my app the name of a table that might change later.

I thought _defaultTableRef would hold a reference to it, but is null. Theres this piece of code nulling it:

https://github.com/progress/JSDO/blob/319202b27d5486ae5023d0351e5a4af4d68f3230/src/progress.js#L2278-L2279

    if (this._numBuffers != 1)
        this._defaultTableRef = null;

Should defaultTableRef be null if there's more than one table for some "background" reason?