The component I'm working on is changing its datastore from mongo -> mysql. In mongo, you can fit a pojo (with other pojo fields) into a document, not in mysql.
For a particular Object, I'd like to be able to toString() it and store that in a mysql TEXT column.
When I retrieve it, I'd like to be able to MyClass.staticToObject(String stringifiedObj) to get a MyClass instance. Is this possible?
I know I can write a custom toString() and parser but it seems a little tedious/prone to errors.
Is there a faster way?
TEXTcolumn? That would be still thinking in Mongo style, but you're not working with Mongo anymore.