Created
August 25, 2015 14:53
-
-
Save yole/efc439e2c2ab11cce6ac to your computer and use it in GitHub Desktop.
Exposed micro-sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object CountryTable : IdTable() { | |
val iso = varchar("iso", 2).uniqueIndex() | |
val name = varchar("name", 250).uniqueIndex() | |
} | |
public class Country(id: EntityID) : Entity(id) { | |
var name: String by CountryTable.name | |
var iso: String by CountryTable.iso | |
} | |
val russia = Country.find { CountryTable.iso.eq("ru") }.firstOrNull() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment