RestyGWT and object graph with recursion

50 views
Skip to first unread message

Edson Richter

unread,
Jun 18, 2017, 3:13:54 PM6/18/17
to RestyGWT
I've a object graph:

  • Company has 0 or many Employees;
  • Employee work for one Company;

Actual GWT-RPC code handles this with easy transparent logic (no need to special tricks either in client side neither in server side code).
Does RestyGWT handle this object scenario without causing recursion errors?

Thanks,

Edson

Ignacio Baca Moreno-Torres

unread,
Jun 19, 2017, 4:36:05 AM6/19/17
to RestyGWT
RestyGWT delegates the JSON parsing to gwt-jackson, and even if gwt-jackson support that, did your server support cyclic JSON references? Don't think so. You can always handle this manually, returning, for example, a simple container with all users and all companies, and each user containing the parent company id. 

Edson Richter

unread,
Jun 19, 2017, 10:16:31 AM6/19/17
to RestyGWT
I've implemented a really easy setup and exchanged GWT-RPC by RestyGWT without any code fuss. I would never suspected that would be so easy!
And about recursion, yes! Jackson 2 has this feature (just need to add one annotation to point the "candidate key" of my POJOs and all the rest is transparent).

I'm really happy with results so far.

Regards,

Edson Richter

Ignacio Baca Moreno-Torres

unread,
Jun 19, 2017, 11:19:14 AM6/19/17
to RestyGWT

Sharing a sample project will be awesome!


--
You received this message because you are subscribed to a topic in the Google Groups "RestyGWT" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/restygwt/c3wiHZ47GJc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to restygwt+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Edson Richter

unread,
Jun 19, 2017, 6:47:16 PM6/19/17
to RestyGWT
I'll try to write a cookbook as soon as possible, but I assure that is enough to follow the docs - really, really easy.

Regards,

Edson Richter
Reply all
Reply to author
Forward
0 new messages