Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Projection doesn't work with a @MappedSuperclass [DATAREST-385] #764

Closed
spring-projects-issues opened this issue Sep 11, 2014 · 3 comments
Closed
Assignees
Labels
type: bug

Comments

@spring-projects-issues
Copy link

spring-projects-issues commented Sep 11, 2014

Petar Tahchiev opened DATAREST-385 and commented

Hello,

I'm having the following MapedSuperclass which is a base class for all my entities:


@MappedSuperclass
public abstract class AbstractEntityModel {

    @Column(name = "id", nullable = false)
    private String uid = java.util.UUID.randomUUID().toString();
}

and I have created a Projection for it in the same package:

@Projection(name = "basic", types = { AbstractEntityModel.class })
public interface BasicEntityModelProjection {

    public String getUid();
}

Unfortunately when I navigate to the /rest url I don't see the projection in the generated URLs of my entities


Backported to: 2.2.1 (Evans SR1)

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Sep 11, 2014

Oliver Drotbohm commented

Is it the ?projection missing only or are you saying that the projection also not getting applied, when you submit the parameter nonetheless

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Sep 14, 2014

Petar Tahchiev commented

Hi Oliver,

I don't see it in the json response, but even if I provide the projection like this: http://localhost:8111/storefront/rest/category?projection=basic it still returns the whole json category

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Oct 21, 2014

Petar Tahchiev commented

Tested with the latest SNAPSHOT it works like a charm :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug
Projects
None yet
Development

No branches or pull requests

2 participants