Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Problem with DataType Text: Deletes entries #278

Closed
philippsimon opened this Issue May 7, 2013 · 2 comments

Comments

Projects
None yet
2 participants

During creation or verification errors during update entries with the DataType Text get removed as the DataType function for Text doesn't return anything.

+1

Had a similar problem with creating an item that has a schema.Text field. When creating an item with a text, the text field is not written to the db when an item is created. I had to store item without text, get the item again, then store the text field.

IIRC things were working correctly on the mysql adapter but not the postgres one.

i fixed it by adding this to lib/schema.js:

/* 242 */        } else if (DataType.name === 'JSON' || DataType === JSON) {
/* 243 */            DataType = function JSON(s) {
/* 244 */                return s;
/* 245 */            };
/* add */        } else if (DataType.name === 'Text' || DataType === Schema.Text) {
/* add */            DataType = function Text(s) {
/* add */                return s;
/* add */            };
/* 246 */        }
/* 247 */        Object.defineProperty(NewClass.prototype, attr, {

@1602 1602 closed this in c4ae9ce May 8, 2013

raymondfeng added a commit to raymondfeng/jugglingdb that referenced this issue May 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment