In our pottery studio, a potter can be apprentice or master. That is, we have Apprentice and Master classes inheriting a Potter class. Also, we chose the Single table strategy for storing data in a database.
Which annotations should be applied to the base class Potter in order to properly implement Single table strategy?
Java
???
public class Potter {
@Id
private Long id;
private String name;
// constructor, getters, setters
}
Kotlin
???
open class Potter(
@Id
open var id: Long = 0,
open var name: String = ""
)