Skip to content
New issue

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

Confusing slice api distincts same expressions #1020

Closed
mustafin opened this issue Aug 26, 2020 · 1 comment
Closed

Confusing slice api distincts same expressions #1020

mustafin opened this issue Aug 26, 2020 · 1 comment
Assignees
Labels

Comments

@mustafin
Copy link

I need to be able to insert same expressions in multiple columns using insert from select

Example:
Users.insert(Users.slice(Users.name, Users.description, datetimeLiteral(now), datetimeLiteral(now)).select{ ... })

I need to use Slice(this, columns) manually since slice method have distinct columns
fun slice(vararg columns: Expression<*>): FieldSet = Slice(this, columns.distinct())

@Tapac Tapac self-assigned this Aug 26, 2020
@Tapac Tapac added the bug label Aug 26, 2020
@Tapac
Copy link
Contributor

Tapac commented Aug 26, 2020

Could you try use .alias as a workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants