Edwin Schravesande6028557
Posts: 0
Joined: Tue Jul 09, 2013 2:44 pm

Something corrupt in my pointers again, pls help

Hey there,

This week I stumbled on some dirty little problem, that was solved by some magic trick of Marina. Something that appeared to be a problem on your side. See this conversation.

https://getsatisfaction.com/apperyio/...

The problem was wonderfully fixed on Friday, but sort of suddenly returned this morning. Could you check out what you can do? I guess you still can access both database and test app, but I'm not sure if that's nessesary.

Edwin Schravesande6028557
Posts: 0
Joined: Tue Jul 09, 2013 2:44 pm

Something corrupt in my pointers again, pls help

I'm somehow warped back some hours work on my app too. I'm not sure what happened, but I deffinitely tested the scripts I wrote front end, so I did save them. I didn't make a version though.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Something corrupt in my pointers again, pls help

Hi,

We'll check but it will take some time.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Something corrupt in my pointers again, pls help

Hello! We manually fixed it in DB again. You have to save JSON into RoundGroup column:
code{
"collName": "rounds_groups":
"id" : "111111111111111111111"
}/code
Looks like the problem is that you have code"collName": "RoundGroup"/code which leads to the error "Collection 'RoundGroup' absent".
The same is in User column, it should have the following structure:
code{
"collName": "users":
"_id" : "111111111111111111111"
}/code

Edwin Schravesande6028557
Posts: 0
Joined: Tue Jul 09, 2013 2:44 pm

Something corrupt in my pointers again, pls help

There's like two ways I filled pointer fields. Some manually in the database GUI, some with script. With this explanation of what's wrong, I think I understand what's causing it too. So thanx a lot, I'll go posting JSON structures instead of id's when building a pointer, and guess that will be a sufficient sollution.

But just to get it straight: do I understand you right that

  • the GUI is automatically building this JSON structure if you just post an id, but you do have to post it as a complete JSON structure if you're scripting?

  • I wouldn't see the difference between one or the other in de database GUI?

    I wonder why I didn't see this problem in the data when querying the whole thing in a REST call. I probably overlooked these problems.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Something corrupt in my pointers again, pls help

Hi,
[quote:]the GUI is automatically building this JSON structure if you just post an id, but you do have to post it as a complete JSON structure if you're scripting? [/quote]
when you add value to Pointer column through GUI you just need to specify ID. If you add through REST Service you have to post JSON structure.

[quote:]I wouldn't see the difference between one or the other in de database GUI?[/quote] yes, there is no way to see the difference between correct and incorrect pointer using GUI.

Edwin Schravesande6028557
Posts: 0
Joined: Tue Jul 09, 2013 2:44 pm

Something corrupt in my pointers again, pls help

That makes sense.

But it's sort of a peculiar that the database in fact does make a JSON pattern when saving a pointer when I'm just shooting in an _id without any JSON.

Only does it put the collumname of the collection you're querying (like you'd expect for a field called "collName"), where correctly it should be referring to the name of the collection it's pointing to.

Or in a sample:

This is what happens when shooting in a blank id: it's converted too
"NameOfCollumn":{
"collName":"NameOfCollumn",
"_id":"some_id"
},

Where it should be:
"NameOfCollumn":{
"_id":"some_id",
"collName":"nameOfCollection"
},

I guess I know how to fix my way around now, but it might be worth fixing this conversionprocess in appery too.
When some script is accepting blank id's as a value for a pointer field, and converting it to JSON, it would better do it's job correctly, wouldn't it? Or is my understanding of this issue somehow falling short?

Edwin Schravesande6028557
Posts: 0
Joined: Tue Jul 09, 2013 2:44 pm

Something corrupt in my pointers again, pls help

I'm totally sorry and sort of ashamed. I see I did mess this up myself anyway. It's not your conversionscript, but some lost code I wrote myself. So please forget about this last post.

Thanx a lot for all the trouble. It's been quite a tricky problem, but I did clean it up now.

Return to “Issues”