November 2018
Intermediate to advanced
388 pages
9h 5m
English
Previously, we created a Person POJO class that we used to illustrate some examples using the CDI. Let's now consider the same POJO again, with some additional fields.
Let's say we want to map this class to a table in a relational database:
class Person : Identity() { var preferredLanguage: PreferredLanguage? = null lateinit var identifier: UUID lateinit var name: PersonName lateinit var loginId: String lateinit var address: Address}
In order to map this POJO class to a table in the database, we need to annotate the class with @Entity. This makes this class identifiable to business domain entities:
@Entityclass Person : Identity() { var preferredLanguage: PreferredLanguage? = null lateinit var identifier: ...Read now
Unlock full access