Page 1 of 1

Database Services for Users Data

Posted: Wed Oct 23, 2013 3:41 pm
by William Bradee

Why can't I import services on Users data (Create, Update, Delete, List, Query)? This seems to be an oversight.

All other tables have this. If I can add columns to Users (e.g. emailAddress) and want to allow update, this isn't handled like other collections. I guess I have to add them manually.

So is it not a good idea to keep other User data in the Users collection?


Database Services for Users Data

Posted: Wed Oct 23, 2013 4:52 pm
by Kateryna Grynko

Hi William,

It's a good idea to store all the users information in 'Users data' collection.

There is no possibility to import services for such collections since it is a service collection needed to prevent accidental damaging of data.


Database Services for Users Data

Posted: Wed Oct 23, 2013 6:48 pm
by William Bradee

I was able to create services for Users GET and UPDATE following the curl example provided in the database (see picture). I just don't quite understand why Appery doesn't treat the Users collection as a first class citizen for purposes of database services. For example, there's not an automatic service to update the password.

Image


Database Services for Users Data

Posted: Wed Oct 23, 2013 7:17 pm
by Kateryna Grynko

Hi William,

Can we help you? Do you have any specific question?


Database Services for Users Data

Posted: Thu Oct 24, 2013 1:13 pm
by William Bradee

I am OK. This is more of a suggestion to allow creation of services for Users collection like other database collections. Thanks.


Database Services for Users Data

Posted: Mon Mar 31, 2014 5:05 pm
by Case

Alternatively, are there any tutorials that DON'T use the import data services method? Like William, I am trying to embed most of my app data within additional columns of the pre-defined Users collection but simply saving data from my user inputs and local storage variables back to the database is proving confusing.

I'm sure I just need to better wrap my head around the REST services, and I'm reading that and the database doc over and over while checking out tutorials but every tutorial I've gone through uses the 'import services' for read/list/update/delete which isn't possible with my user collection.

Are there any tutorials I've missed that setup these services manually?
What is the difference between read and list?
When should I use a CREATE service vs using an UPDATE service? If I create the column in the db online editor should I just stick to using UPDATE?

Thanks,
Casey


Database Services for Users Data

Posted: Mon Mar 31, 2014 8:57 pm
by Maryna Brodina

Hello!

In tutorials there are request parameters to DB which you can use to create any request.

[quote:]What is the difference between read and list - "read"[/quote]- is reading specific record in collection using _id, "list" - retrieving all records.

[quote:]"create the column in the db"[/quote] - using REST service you can't add/delete column in DB. You can add record in collection ("create" service) or update record with specified _id in collection ("update" service)