Hi,
I have a small inheritance problem in Spring Data Neo4j 6.1.4.
Notification is an abstract class and RequestNotification is one of the supertypes.
interface NotificationRepository : Neo4jRepository<Notification, Long> {
fun findByNotificationId(notificationId: Long): Notification?
}
In SDN5 I could then use the returned object and see the exact type.
...
val notification = findNotificationById(notificationId)
if(notification !is RequestNotification)
throw IllegalArgumentException()
...
This can't be done after migrating to SDN6 anymore. I am getting the exception thrown, that means that Notification is not a subtype of RequestNotification.
In the database, the nodes have correct labels (i.e. Notification and RequestNotification.)
In the documentation, I couldn't see the answer to this.
What are my options?