On Sunday, June 21, 2015 at 9:29:01 PM UTC+2, Aldo wrote:
And now I need to map B as an Entity Proxy as well, but I'm getting an exception. What I did is:HI,I have a class A that is an entity on my server side and a class B that extends A (with PrimaryKeyJoinColumn). So, in other words I have:
I know this is an old thread, but I'm having a similar problem.
@Entity
@Inheritance(strategy=InheritanceType.JOINED)
public class A {
...
}
@Entity
@PrimaryKeyJoinColumn(name="a_id", referencedColumnName="id")
public class B extends A {
...
}
I already have A extending EntityProxy:
@ProxyFor(A.class)
public interface AProxy extends EntityProxy {
...
}
@ProxyFor(B.class)
public interface BProxy extends AProxy, EntityProxy {
...
}
but I get the following exception:
BProxy is not an EntityProxy type
at com.google.web.bindery.requestfactory.shared.impl. IdFactory.asEntityProxy( IdFactory.java:66)
Is it possible to do what I'm trying here? If so, how?
Assuming you get that error on the client side, it actually means that your RequestFactory doesn't know about BProxy.
BProxy has to be referenced from a RequestContext or another EntityProxy/ValueProxy transitively referenced from your RequestFactory interface.
You might have to annotate one of your RequestContext or proxy with @ExtraTypes(BProxy.class).
See http://www.gwtproject.org/doc/latest/DevGuideRequestFactory.html#transportable (search for ExtraTypes there)
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment