> On the other hand,
>
> sessionFactory.openDatabinder().toXML(foo);
>
> does a really nice job of printing an object.....

I haven't tried that, but I will, thanks.

This made me think some more...  Ideally, having a single method with fixed
behavior for something like this, on a class like Hibernate or Session, may
not be such a good idea.  It would be better if the behavior were
customizable or pluggable, and perhaps that would lead to a different
interface style anyway.

Perhaps the code to do this could be packaged as a class which a developer
could use to implement their own final result, i.e. provide methods that
allow the components of an object's string representation to be arranged
differently, abbreviated, or whatever.  This could have the additional
benefit of not needing to extend any existing classes or interfaces, and
being more orthogonal to the core Hibernate persistence functionality.

Anton



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to