Skip to content

Handle GEOMETRY columns with include option - #4822

Closed
alxarch wants to merge 1 commit into
sequelize:masterfrom
alxarch:master
Closed

alxarch wants to merge 1 commit into
sequelize:masterfrom
alxarch:master

Conversation

@alxarch

@alxarch alxarch commented Nov 6, 2015

Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like completely new syntax?
Would return [sequelize.fn('AsText', sequelize.col(column)), column] not accomplish the same thing?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't handle the include case of adding mainTableAs prefix to column. I tried with

return [(new Utils.fn('AsText', [new Utils.col(column)])), column];

This results in

SELECT AsText(`location`) AS `location`, ...

instead of

SELECT AsText(`Home`.`location`) AS `location`, ...

also tried to pass an [mainTableAs, attr] argument to geometrySelect but it hits another error:

Cannot call Sequelize.col() with array outside of order / group clause

Which I don't understand why exists as a check anyway

@alxarch

alxarch commented Nov 9, 2015

Copy link
Copy Markdown
Author

This is a temporary fix. As it seems that the issue will be addressed in a different manner by #4186

@janmeier janmeier mentioned this pull request Nov 10, 2015
4 of 5 tasks
@janmeier janmeier closed this Dec 15, 2015
@janmeier

Copy link
Copy Markdown
Member

Handled in #4834

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants