Created
November 14, 2014 22:20
-
-
Save TGOlson/0d46ec76d96db794ac32 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // place in root launchpad folder | |
| var entityDao = require('./server/services/entity-dao'), | |
| config = require('./server/config/config'), | |
| systemService = require('./server/services/mj-entity-service/mj-entity-service'); | |
| entityDao.connect(config.db) | |
| .then(actions) | |
| .fail(onError); | |
| function actions() { | |
| var eid = systemService.makeEid('system', 'tenant-0'), | |
| tenant = systemService.get(eid); | |
| logProps('Before load', tenant); | |
| return tenant.load({type: true}).then(function() { | |
| logProps('After load type', tenant); | |
| return tenant.load({communities: true}); | |
| }).then(function() { | |
| logProps('After load community', tenant); | |
| }); | |
| } | |
| function logProps(status, tenant) { | |
| console.log(status, tenant.loadedProperties); | |
| } | |
| function onError(err) { | |
| console.error('Junk file error', err.stack || err); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment