| 42 | }; |
| 43 | |
| 44 | relate(columnName, objectTableName, objectId) { //for setting data for a particular column |
| 45 | |
| 46 | var keywords = ['_tableName', '_type', 'operator']; |
| 47 | |
| 48 | if (columnName === 'id' || columnName === '_id') |
| 49 | throw "You cannot set the id of a CloudObject"; |
| 50 | |
| 51 | if (columnName === 'id') |
| 52 | throw "You cannot link an object to this column"; |
| 53 | |
| 54 | if (keywords.indexOf(columnName) > -1) { |
| 55 | throw columnName + " is a keyword. Please choose a different column name."; |
| 56 | } |
| 57 | |
| 58 | this.document[columnName] = new CB.CloudObject(objectTableName, objectId); |
| 59 | CB._modified(this, columnName); |
| 60 | }; |
| 61 | |
| 62 | get(columnName) { //for getting data of a particular column |
| 63 | |