Skip to content

Instantly share code, notes, and snippets.

@ktkaushik
Created July 11, 2013 13:14
Show Gist options
  • Select an option

  • Save ktkaushik/5975343 to your computer and use it in GitHub Desktop.

Select an option

Save ktkaushik/5975343 to your computer and use it in GitHub Desktop.
User and Post model object
User:
{ [Function: ModelConstructor]
validatesPresenceOf: [Function],
validatesLengthOf: [Function],
validatesNumericalityOf: [Function],
validatesInclusionOf: [Function],
validatesExclusionOf: [Function],
validatesFormatOf: [Function],
validate: [Function],
validateAsync: [Function],
validatesUniquenessOf: [Function],
afterInitialize: null,
beforeValidate: null,
afterValidate: null,
beforeSave: null,
afterSave: null,
beforeCreate: null,
afterCreate: null,
beforeUpdate: null,
afterUpdate: null,
beforeDestroy: null,
afterDestroy: null,
scope: [Function],
relationNameFor: [Function: relationNameFor],
hasMany: [Function: hasMany],
belongsTo: [Function],
hasAndBelongsToMany: [Function: hasAndBelongsToMany],
include: [Function],
defineProperty: [Function],
whatTypeName: [Function],
_forDB: [Function],
create: [Function],
updateOrCreate: [Function: upsert],
upsert: [Function: upsert],
findOrCreate: [Function: findOrCreate],
exists: [Function: exists],
find: [Function: find],
all: [Function: all],
findOne: [Function: findOne],
destroyAll: [Function: destroyAll],
count: [Function],
toString: [Function],
getter: {},
setter: {},
forEachProperty: [Function],
registerProperty: [Function] } }
{ Post:
{ [Function: model]
base:
{ connections: [Object],
plugins: [],
models: [Object],
modelSchemas: [Object],
options: {} },
modelName: 'Post',
model: [Function: model],
db:
{ base: [Object],
collections: [Object],
models: {},
replica: false,
hosts: null,
host: 'localhost',
port: 27017,
user: undefined,
pass: undefined,
name: 'dev',
options: [Object],
_readyState: 1,
_closeCalled: false,
_hasOpened: true,
_listening: true,
db: [Object] },
schema:
{ paths: [Object],
subpaths: {},
virtuals: [Object],
nested: {},
inherits: {},
callQueue: [],
_indexes: [],
methods: {},
statics: {},
tree: [Object],
_requiredpaths: undefined,
options: [Object] },
options: undefined,
collection:
{ collection: [Object],
opts: [Object],
name: 'posts',
conn: [Object],
queue: [],
buffer: false } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment