Hey, I am discussing with Spring Data team about `...
# spring
s
Hey, I am discussing with Spring Data team about
Persistable
. I would like to avoid having to use
Persistable
with data classes which does not seems a good fit, but there is something I am not sure about Kotlin / Java interop. Let's take following code (
Persistable
is a Java interface):
Copy code
public interface Persistable<ID> {
	@Nullable
	ID getId();
	boolean isNew();
}
Copy code
data class User(
		val id: String?,
		val firstname: String,
		val lastname: String) : Persistable<String?> {

	override fun isNew(): Boolean = id.isNullOrBlank()
}