Last active
May 25, 2016 12:53
-
-
Save nakamura-to/07cda32b9eb12a658670833e9aac403a to your computer and use it in GitHub Desktop.
Embeddable support in Doma (Kotlin)
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
@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) |
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
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