backand

Backand deep querying

怎甘沉沦 提交于 2019-12-22 11:19:05
问题 I want to know if it is possible to retrieve and the collection of objects that an object holds in Backand. For example - you have an object 'Trip' which has a one-to-many relationship with 'Destination' as a trip can have many destinations. The attribute 'destination' in object 'Trip' is a collection. Is it possible, when querying for a 'Trip' object, that I am able to receive the associated 'Destination' objects that the 'Trip' object has a collection of ? 回答1: While getting the parent

Backand.signup() - “Create My App User” failed to perform

╄→гoц情女王★ 提交于 2019-12-19 09:09:57
问题 I'm trying to register a new user using: Backand.signup(firstName, lastName, username, password, password2); but I end up getting: POST https://api.backand.com/1/user/signup 504 (GATEWAY_TIMEOUT) When I check the logs (Log > Server Side Exceptions), I notice this error: An unexpected signup exception occured The following action: "Create My App User" failed to perform: The operation has timed out The operation has timed out Exception has been thrown by the target of an invocation. The

Update a complex object on Backand using $http PUT

南笙酒味 提交于 2019-12-13 02:21:35
问题 I am using Backand to provide the database and REST api for my Angular app. I am working on a capability for users to make edits to a complex object, which should then be updated on the database. Straightforward enough... The object looks a bit like this: obj = { id: 1, // assigned by the db name: "My List", tasks: [ { id: 1, desc: "Task 1" }, { id: 2, desc: "Task 2" }, ... ] } For the update ($http PUT) call, I would like to use params: { deep: true } as a shortcut to minimise code and $http

How to create objects that have relationships when using Backand BaaS?

泪湿孤枕 提交于 2019-12-12 19:13:13
问题 I am using Backand BaaS for my ionic app. My model consists of two tables: 1. Users 2. Trips A one-to-many relationship has been established between 'Users' and 'Trips'. 'Users' has a collection field that is a collection of 'Trips' and 'Trips' has a owner field that is an object of 'Users'. What is the correct way to create an object so that upon creating I am assigning the correct owner ('Users' object) to 'Trips' collection field ? 回答1: When POSTing a new Trip use this for the Trip Object

User specific content

本秂侑毒 提交于 2019-12-12 02:13:35
问题 I'm new to Backand and the backend field overall, and I need some enlightenment. Basically I'm trying to make an application where users can register and sign in. While the user is signed in he can create simple things, for example a to-do list. The to-do list is then saved on the database and can only be viewed on the page by the user who created it. So far there is a function for signing up, logging in and create/post items. The current user authentications are basically like in the

When retrieving the list of “master” objects, Backand Fails to retrieve “slave” objects

两盒软妹~` 提交于 2019-12-11 11:58:41
问题 When retrieving the list of "master" objects, Backand Fails to retrieve "slave" objects app springnutjs When retrieving the list of "master" objects (the ones with the "collection, via" field), Backand Fails to retrieve "slave" (the ones with the "object" field) objects even if it does work retrieving the "master" objects when retrieving the list of all "slave" objects 回答1: In order to get collections ("slave") you need to use query parameter: deep=true. When calling a list of objects there

How to use Backand Security Action Parameters

筅森魡賤 提交于 2019-12-08 10:49:25
问题 The short way to ask this question is this; Does anyone know if it's possible to use the parameters supplied to the signup method on the api to conditionally set the role of the newly created user? Now for a more detailed question; I am working on an app that has users of several different types that I'd like to assign a backand security Role to. I am trying to conditionally set a users role based on a parameter that is supplied to the Backand signup method, but I cannot figure out how to

How can i filter multiple fields with OR in Backand?

蓝咒 提交于 2019-12-08 04:50:19
问题 i am passing filter value but its always matches both field where i need optional matches for this [ { "fieldName": "Firstname", "operator": "equals", "value": "Megh" }, { "fieldName": "Lastname", "operator": "contains", "value": "doot" }] 回答1: return $http ({ method: 'GET', url: Backand.getApiUrl() + '/1/objects/users', params: { filter: { "q": { { "$or": [ { "firstName": { "$eq": "Megh" } }, { "lastName": {"$like": "doot"} } ] } } } } }); You can read further: http://docs.backand.com/en

adding related data to backand api

谁说我不能喝 提交于 2019-12-02 06:46:00
问题 I have a database setup with a couple of different objects. For example lets say I have an object called 'kids' and a related object called 'toys'. Toys has a 'kid' id field which references the kid. What I would like is that when I create a kid I can also send a list of toys and have it automatically add those toys. I created an action in the After Create section, but whenever I check the 'userInput' variable my extra data isn't there ( I'm using the test function in the app ). Consider the

adding related data to backand api

对着背影说爱祢 提交于 2019-12-02 05:26:59
I have a database setup with a couple of different objects. For example lets say I have an object called 'kids' and a related object called 'toys'. Toys has a 'kid' id field which references the kid. What I would like is that when I create a kid I can also send a list of toys and have it automatically add those toys. I created an action in the After Create section, but whenever I check the 'userInput' variable my extra data isn't there ( I'm using the test function in the app ). Consider the following: return $http ({ method: 'POST', url: Backand.getApiUrl() + '/1/objects/kids/', params: {