Hello Users,

 

I am trying to use XSTREAM as serialization engine to backup my database. We
use hibernate as OR mapper. 

My intention is to serialize table by table (entity class by entity class).
And so I came across associations. 

If I serialized each table standalone at the end I will have any instance
serialized. The problem now is to enforce the foreign key. So I want to only
serialize the unique id for associated entities.

So when restoring the database again I can easily recreate the constraints. 

 

How can I achieve this? All may entities derive from a base class so I have
a good point to start at. But I do not know how to detect in a converter
whether the current object is a top level entity or an association.

 

 

Kind regards


Sebastian Götz

 

Reply via email to