Hi,
I think something was discussed here some time ago
http://www.mail-archive.com/[email protected]/msg05674.html.
I have this in my TODO but it has to be "two birds - one rock" in my
case, so if my thesis submission pushes through I will be implementing
the marshaller (complex relationships are bloated in DTOs anyway).
Regards,
Marek
On 06/02/2011 01:57 PM, Andrus Adamchik wrote:
On Jun 2, 2011, at 2:43 PM, Andrus Adamchik wrote:
XML (or other types of serialization) of framework-managed objects is a pretty
involved topic. So my advise would be to use your own POJO data transfer
objects (DTO) to work with JAXB (those can be auto generated from the model
with custom templates if you want).
And I wish at some point we'd create JAXB bindings for Cayenne. Just that
nobody volunteered to do that yet. We took a few shots at various XML
serialization implementations. The most notable are:
1.
http://cayenne.apache.org/doc30/api/org/apache/cayenne/xml/package-summary.html
Working, but has severe performance limitations. Deprecated in 3.1 and will be
removed from Cayenne in the future.
2. http://svn.apache.org/repos/asf/cayenne/sandbox/cayenne-serialization/
A proof of concept that I wrote for metadata-driven XStream-based serializer
(can work with JSON or XML). I like this one. It provides fine-grained control
over which parts of the object graph are serialized and is generally more
flexible than 1. However it still requires significant work to make it
production-quality.
3. Finally the JAXB integration was an idea that was floated around, but hasn't
materialized yet.
Any interested parties are welcomed to jump on the dev list and discuss this
further (and offer help!).
Cheers,
Andrus