Open
Description
Hi the spring team,
When we use the add
method on a PagedModel, this method will return a CollectionModel and we "loose" the type PagedModel type. In fact, if we want to retrieve it, we can cast the CollectionModel into a PagedModel.
This can be achieve creating a new abstract class AbstractCollectionModel<S extends AbstractCollectionModel<S, T>, T>
which will extends RepresentationModel<S>
. After that, CollectionModel<T>
will be empty and will extends AbstractCollectionModel<CollectionModel<T>, T>
and it will be almost the same for PagedModel
I can submit a PR if you want with this changes.
Metadata
Metadata
Assignees
Labels
No labels