Skip to content

Instantly share code, notes, and snippets.

@nakamura-to
Last active May 25, 2016 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nakamura-to/07cda32b9eb12a658670833e9aac403a to your computer and use it in GitHub Desktop.
Save nakamura-to/07cda32b9eb12a658670833e9aac403a to your computer and use it in GitHub Desktop.
Embeddable support in Doma (Kotlin)
@Embeddable
data class Address(val city: String, val street: String)
@Entity(immutable = true)
data class Person(@Id val id: Int, val name: String, val address: Address)
create table person (
id int primary key,
name varchar(100),
city varchar(100),
street varchar(100)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment