Vincent Lau

Results 110 comments of Vincent Lau

Self increment: ```kotlin database.update(Foo) { it.version to it.version + 1 where { (it.id eq 1) and (it.version eq 1) } } ``` Generated SQL: ```sql update foo set version =...

Got it, but it is not supported yet. We can directly use SQL DSL as a workaround.

Thank you for your feedback, I will consider your suggestion.

@Luiz-Monad We have entity sequence APIs that supports calling `filter` continuously, that's a couterpart of LINQ's `where` function.

Good idea, thank you for your feedback.

> Did a bit more digging and found this somewhat related issue, which points to this code. It seems that withReferences flag is really only used for when you are...

> So the question remains - if I have nested entities is there a way to make Ktorm smart enough to insert both at the same time, or do I...

Create an entity like it's a data class. Now: ````kotlin Department { id = 123 name = "tect" } ```` Expected: ````kotlin Department( id = 123, name = "tect" )...

Or we can write a compiler plugin? https://www.youtube.com/watch?v=w-GMlaziIyo

Ktorm 的 `Database` 对象应该是单例的,建议把它放到 Koin 的容器里面管理,在 DAO 里面,使用 `inject()` 获取即可