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

DAO is not DRY #48

Closed
JonLatane opened this issue Sep 2, 2016 · 0 comments
Closed

DAO is not DRY #48

JonLatane opened this issue Sep 2, 2016 · 0 comments

Comments

@JonLatane
Copy link
Contributor

JonLatane commented Sep 2, 2016

From the Readme:

class User(id: EntityID<Int>) : IntEntity(id) {
    companion object : IntEntityClass<User>(Users)

    var name by Users.name
    var city by City referencedOn Users.city
    var age by Users.age
}

I have to repeat myself too much. I would like to be able to write:

class User(id: EntityID<Int>) : IntEntity<User>(id) {
   companion object Users
   var name by Users.name
}

I'm currently learning Kotlin and I understand the limitation that we can't use generic companion objects (meaning we have to rework the way the per-transaction caching works), so I'm curious if others more savvy might have ideas for how we could accomplish this. This is a pretty big refactor that I'm thinking of taking on but I was wondering if folks here might be receptive to it?

@Tapac Tapac closed this as completed Feb 15, 2020
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

No branches or pull requests

2 participants