Page 1 of 1

Embedded documents

Posted: Fri Aug 01, 2014 1:21 pm
by S7014877

Hello,

I am trying to create Embedded documents in the appery.io database
{
username: "123zyx",
contact: {
phone: 5555555555,
email: "a href="mailto:asde@sder.com" rel="nofollow"asde@sder.com/a"
},
access: {
level: 5
group: "dev"
}
}

Please help me on how to do it


Embedded documents

Posted: Fri Aug 01, 2014 1:50 pm
by Evgene Karachevtsev

Hello,

Could you please clarify your question in details, what exactly you can't do?


Embedded documents

Posted: Fri Aug 01, 2014 2:01 pm
by S7014877

Hi I am trying to create a document with Embedded values as below -

If I have a collection called c_log - I need to create a document as below -
{
username: "123zyx",
contact: {
phone: 5555555555,
email: "a href="mailto:asde@sder.com" rel="nofollow"asde@sder.com/a"
},
access: {
level: 5
group: "dev"
}
}


Embedded documents

Posted: Fri Aug 01, 2014 5:46 pm
by Kateryna Grynko

Hello,

Could you please post a screenshot of your collection 'c_log' so we could see all fields and their types?


Embedded documents

Posted: Sat Aug 02, 2014 1:16 am
by S7014877

Sure, but I dont know how to display the types....please see attached

Many thanks Image


Embedded documents

Posted: Sat Aug 02, 2014 2:04 am
by S7014877

Embedded documents

Posted: Sun Aug 03, 2014 10:53 pm
by Yurii Orishchuk

Hello,

Please follow these steps:

1 Open DB.

2 Open collection which is you want to populate with these values.

3 Create column with type "Object" http://prntscr.com/499qij/direct

4 Add new row.

5 Populate this column in new row with json string:

pre

{
"username": "123zyx",
"contact": {
"phone": 5555555555,
"email": "asde@sder.com"
},
"access": {
"level": 5,
"group": "dev"
}
}

/pre

You can use any correct JSON object in this field.

Regards.


Embedded documents

Posted: Mon Aug 04, 2014 1:53 am
by S7014877

Hello Yurii,

Got it, thanks very much!

Sam