-
Notifications
You must be signed in to change notification settings - Fork 62
broken atribute columnName #88
Comments
@masitko Thanks for posting, we'll take a look as soon as possible. In the meantime, if you haven’t already, please carefully read the issue contribution guidelines and double-check for any missing information above. In particular, please ensure that this issue is about a stability or performance bug with a documented feature; and make sure you’ve included detailed instructions on how to reproduce the bug from a clean install. Finally, don’t forget to include the version of Node.js you tested with, as well as your version of Sails or Waterline, and of any relevant standalone adapters/generators/hooks. Thank you! |
To fix the error line 92 of file https://github.com/balderdashy/waterline-sequel/blob/master/sequel/select.js needs to be changed from
to
|
Pull request: |
@masitko it looks like it's actually a combination of a few things. I submitted 2 PR's that should solve this problem I'd like you to test before I go ahead and publish them. First was an issue in Waterline where the auto-migrations were not normalizing the Both of those PR's are merged so let me know what you see. I ran through some manual tests and they pass all the adapter tests. |
@particlebanana it wasn't fixed I'm afraid. Still
when trying to lift Sails. Please have a look at file select.js around line 90:
and what self.schema[self.currentTable] contains:
As we can see definition key for column user is already updated to userId.
When columnName is set schema = {} |
@particlebanana it does lift after updating waterline to the latest master. |
@particlebanana it lifted once with clean database but after loading fixtures I got some validation errors:
This seems to be an old problem, I'm not sure if this i's related to my models definition/fixtures or changes in waterline 0.11.x -> 0.12.x latest master. |
That is the expected behavior. By the time it gets to there the |
I'm not sure if this works correctly, it may be related to my broken/out of date dependencies but: I can lift sails only first time with clean database and fixtures are being loaded OK.
which I never seen before and relations between models seem to be broken. After that every attempt to lift ends with an error and waterline tries to migrate my database despite I didn't change anything:
Let me know if I can help in any way. |
@masitko @particlebanana Guys after hours of debug, i found that magic wrong goes here with 99% not in ^^^^^^^^^^^^^^^^^^^^MySQL.processChildren.groupedRecords^^^^^^^^^^^^^^
{ undefined:
[ RowDataPacket {
id: 1,
comment: '2',
createdAt: Mon Apr 18 2016 23:41:20 GMT+0300 (FLE Daylight Time),
updatedAt: Mon Apr 18 2016 23:41:20 GMT+0300 (FLE Daylight Time) } ] }
^^^^^^^^^^^^^^^^^^^^groupedRecords^^^^^^^^^^^^^^ So we see that it should get an field
I dont know if it helps but additional info always need. |
i don't think the real problem is in sequel, i think adapter should not receive other thing than columnName by waterline...the bug should be report in waterline repo because all adapter should have the same problem if they don't play with attributes ... |
After updating to version 0.6.2 (from 0.5.x, using sails-postgresql adapter) there is an error when lifting sails:
the error seems to be caused by problem in select.js around line 90:
The text was updated successfully, but these errors were encountered: