Ah, ok. I think the basic problem is, that you are trying to persist an interface instead of a DTO with this call chain.
And now the exception make sense to me. You cannot create an instance of an interface (this easy) and it would not make any sense in this case, because the interface projection is in general a read-only representation.
@gerrit_meier Thanks for the reply. Thats what I had assumed but couldn't find it stated in the doco, so thanks for verifying.
Looking at that example dto you posted I see it uses a multi level projection for mayor, citizens and cityEmployees. I've had no luck getting this to work in my project with class based projections, and get a ClassCastException when I load the projection using the repository: Cannot cast MyEntity to MyProjection.
@gerrit_meier Any chance you can help with some direction on my other question. Trying to plan migration to latest version, and trying to get my head around best approach to use projections to limit the amount of graph that gets loaded.