We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider a following self-referencing schema:
CREATE TABLE items ( id INTEGER NOT NULL PRIMARY KEY, name VARCHAR NOT NULL, parent_id INTEGER, CONSTRAINT fk_parent_id FOREIGN KEY (parent_id) REFERENCES items(id) )
it's possible to create a query like this:
val table = columnSet.table("items") val id :*: nm :*: parentId :*: _ = table.columns val id2 :*: nm2 :*: _ :*: _ = table.columns val selfJoined = select(id ++ nm ++ parentId ++ nm2) from(table join table).on(id2 === parentId)
that will render as:
select items.id, items.name, items.parent_id, items.name from items inner join items on items.id = items.parent_id
This is incorrect. Instead the SqlServerModule#renderRead should generate aliases for the tables so that the query would look something like this:
SqlServerModule#renderRead
select i1.id, i1.name, i1.parent_id, i2.name from items as i1 inner join items as i2 on i2.id = i1.parent_id;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Consider a following self-referencing schema:
it's possible to create a query like this:
that will render as:
This is incorrect. Instead the
SqlServerModule#renderRead
should generate aliases for the tables so that the query would look something like this:The text was updated successfully, but these errors were encountered: