I made a projection which should expose nested entities:
@Projection(name = "inlineBusiness", types = { UserModel.class })
public interface InlineBusinessUserModelProjection {
String getUsername();
String getFirstName();
String getLastName();
Date getBirthdate();
String getEmail();
BusinessModel getBusiness();
}
And the service repository:
@RepositoryRestResource(collectionResourceRel = "users", path = "users",
excerptProjection = InlineBusinessUserModelProjection.class)
public interface UserRepository extends BaseDAO<UserModel> {..}
for /users
it works fine, the business field is exposed with nested entity, but when I call /users/1
- nothing, also all the custom methods.. Seems like projection isn't involved on any methods except of /users
Any ideas?
?projection=inlineBusiness
to/users/1
- it doesn't work.. Inside/alps/users/
also there is no any notification of inlineBusiness.. – Queenqueena