This repository has been archived by the owner on Aug 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Registers with only id #28
Comments
What does your model look like? The only way these would get in is if you have timestamps turned off with no required attributes and do a create (possibly through blueprints) so that a record is created. |
Hi particlebanana, I'm sorry that I forgot print that out. Here's my model. _employees = Waterline.Collection.extend
identity: 'employees'
connection: settings.defaultConnection or 'default'
tableName: 'Employees'
schema: yes
attributes:
name:
type: 'string'
required: yes
minLength: 5
maxLength: 100
birthdate:
type: 'date'
required: yes
federalDocument:
type: 'string'
required: yes
minLength: 14
maxLength: 14
stateDocument:
type: 'string'
required: yes
maxLength: 14
stateDocumentIssuer:
type: 'string'
required: yes
maxLength: 8
post:
type: 'string'
maxLength: 30
bank:
type: 'integer'
bankBranch:
type: 'integer'
accountNumber:
type: 'integer'
remarks:
type: 'text'
homeAddress:
model: 'employeesAddresses'
billingAddress:
model: 'employeesAddresses'
phones:
collection: 'employeesPhones'
via: 'employee'
office:
model: 'offices'
_employeesAddresses = Waterline.Collection.extend
identity: 'employeesAddresses'
connection: settings.defaultConnection or 'default'
tableName: 'EmployeesAddresses'
schema: yes
attributes:
zip:
type: 'integer'
required: yes
address:
type: 'string'
required: yes
maxLength: 250
city:
type: 'string'
required: yes
maxLength: 100
state:
type: 'string'
required: yes
maxLength: 2
_employeesPhones = Waterline.Collection.extend
identity: 'employeesPhones'
connection: settings.defaultConnection or 'default'
tableName: 'EmployeesPhones'
schema: yes
attributes:
type:
type: 'integer'
enum: (t for i, t of phoneTypes)
required: yes
number:
type: 'integer'
required: yes
employee:
model: 'employees' |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I dont know why, but sails-memory generates registries inside collections with nothing but an id.
Worse than that, it generates registries undefined
(added console.log(this.data[collectionName]); at line 499 of lib/database.js)
The text was updated successfully, but these errors were encountered: