You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by svilen <az...@svilendobrev.com> on 2012/12/05 12:56:27 UTC
touchdb+ektorp woes
g'day
not sure if this is the proper place to ask..
i'm trying to use Touchdb on Android.
It is using Ektorp, and there's some defect in the POJO object Mapping.
i've debugged it (very hard).. Ektorp's QueryResultParser
is expecting the properties of the result row (which is json object) to
be ordered id,key,value; while Touchdb is putting them in another
order (namely, value is before key). Hence the queryView( query,
some.class.to.map.to) never succeeds.
i'm not sure if the Ektorp's expectations are right (are attributes of
a js object ordered), or what.
anyone to suggest something?
the original iOS touchdb is my next step, i hope it is better there.
ciao
svilen
Re: touchdb+ektorp woes
Posted by Robert Newson <rn...@apache.org>.
from json.org: "An object is an unordered set of name/value pairs".
Sounds like an Ektorp bug.
B.
On 5 December 2012 12:42, Aliaksandr Barysiuk <a....@gmail.com> wrote:
> I have never seen that couchdb returned results in other order than
> id,key,value. However IMHO its a Ektorp issue. I tried to run
> QueryResultParser test with id,value,key sequence and it's failed.
> I dont think that its very complicated to ignore the sequence. You could try
> to post issue/feature to Ektorp's github tracker
> https://github.com/helun/Ektorp/issues.
>
> Alex
>
>
> On 05/12/12 14:56, svilen wrote:
>>
>> g'day
>> not sure if this is the proper place to ask..
>>
>> i'm trying to use Touchdb on Android.
>> It is using Ektorp, and there's some defect in the POJO object Mapping.
>>
>> i've debugged it (very hard).. Ektorp's QueryResultParser
>> is expecting the properties of the result row (which is json object) to
>> be ordered id,key,value; while Touchdb is putting them in another
>> order (namely, value is before key). Hence the queryView( query,
>> some.class.to.map.to) never succeeds.
>> i'm not sure if the Ektorp's expectations are right (are attributes of
>> a js object ordered), or what.
>>
>> anyone to suggest something?
>>
>> the original iOS touchdb is my next step, i hope it is better there.
>>
>> ciao
>> svilen
>
>
Re: touchdb+ektorp woes
Posted by svilen <az...@svilendobrev.com>.
aha. i'll post an issue with Ektorp.
there's another mismatch, Ektorp's repository getAll() is literally
checking if the database contains a design-document
"_design/something/_view/all"... which with Touchdb may not be the
case - views are native functions and may not be in the db as
documents.
maybe Touchdb can fake a response here.. if such view/function exists.
but anyway, this one is easily work-around-able.
ciao
svilen
On Wed, 05 Dec 2012 15:42:58 +0300
Aliaksandr Barysiuk <a....@gmail.com> wrote:
> I have never seen that couchdb returned results in other order than
> id,key,value. However IMHO its a Ektorp issue. I tried to run
> QueryResultParser test with id,value,key sequence and it's failed. I
> dont think that its very complicated to ignore the sequence. You
> could try to post issue/feature to Ektorp's github tracker
> https://github.com/helun/Ektorp/issues.
>
> Alex
>
> On 05/12/12 14:56, svilen wrote:
> > g'day
> > not sure if this is the proper place to ask..
> >
> > i'm trying to use Touchdb on Android.
> > It is using Ektorp, and there's some defect in the POJO object
> > Mapping.
> >
> > i've debugged it (very hard).. Ektorp's QueryResultParser
> > is expecting the properties of the result row (which is json
> > object) to be ordered id,key,value; while Touchdb is putting them
> > in another order (namely, value is before key). Hence the
> > queryView( query, some.class.to.map.to) never succeeds.
> > i'm not sure if the Ektorp's expectations are right (are attributes
> > of a js object ordered), or what.
> >
> > anyone to suggest something?
> >
> > the original iOS touchdb is my next step, i hope it is better there.
> >
> > ciao
> > svilen
>
Re: touchdb+ektorp woes
Posted by Aliaksandr Barysiuk <a....@gmail.com>.
I have never seen that couchdb returned results in other order than id,key,value. However IMHO its a Ektorp issue. I
tried to run QueryResultParser test with id,value,key sequence and it's failed.
I dont think that its very complicated to ignore the sequence. You could try to post issue/feature to Ektorp's github
tracker https://github.com/helun/Ektorp/issues.
Alex
On 05/12/12 14:56, svilen wrote:
> g'day
> not sure if this is the proper place to ask..
>
> i'm trying to use Touchdb on Android.
> It is using Ektorp, and there's some defect in the POJO object Mapping.
>
> i've debugged it (very hard).. Ektorp's QueryResultParser
> is expecting the properties of the result row (which is json object) to
> be ordered id,key,value; while Touchdb is putting them in another
> order (namely, value is before key). Hence the queryView( query,
> some.class.to.map.to) never succeeds.
> i'm not sure if the Ektorp's expectations are right (are attributes of
> a js object ordered), or what.
>
> anyone to suggest something?
>
> the original iOS touchdb is my next step, i hope it is better there.
>
> ciao
> svilen