Announcement Announcement Module
No announcement yet.
Roo + GWT: inheritance & proxy generation bug Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roo + GWT: inheritance & proxy generation bug

    Hi All,
    I just got a bug... Pretty simple example with inheritance:

    entity --class ~.server.domain.Contact
    field string --fieldName background
    entity --class ~.server.domain.PersonContact --extends ~.server.domain.Contact
    entity --class ~.server.domain.CompanyContact --extends ~.server.domain.Contact
    field string --fieldName firstName --class ~.server.domain.PersonContact
    field string --fieldName lastName
    field string --fieldName title
    field reference --fieldName company --type ~.server.domain.CompanyContact
    field string --fieldName name  --class ~.server.domain.CompanyContact
    gwt setup
    The problem what Roo+GWT extends PersonContactProxy & CompanyContactProxy from EntityProxy, not ContactProxy... As result, in app generated by default you'll have ClassCastException for both child classes when you'll try to get all Contacts.

    That's sux guys... app generated by default NOT working... :/

  • #2
    same problem

    i found the same bug. Is there a way to solve this manually. the only thing it would take to work would be that the proxy interface does not directly extend EntityProxy but the proxy-Interface of the super-class.

    is there already a JIRA-Ticket for this problem, if not i will open one. This is a real blocker for developers who like a rich domain-model in their persistence layer.

    if not, can somebody suggest where in the code this bug is located so i can try to fix it myself.



    • #3
      Hey guys, polymorphism isn't supported by RequestFactory in GWT 2.3 but will be supported in GWT 2.4 ( This will be rectified when GWT 2.4 is released.


      • #4
        thanks for your reply, we found a workaround in the meantime. since the exception happens at the server we could use aspectj to let the subclass-proxy implements the superclass-proxy


        • #5
          Is it possible for someone to elaborate a little more on the workaround? I would like to implement polymorphism, but I am not as proficient at AspectJ as I would like be.