Hi Nikola,
Thank you very much for your email. I just realised that our manual's
section about serialisability is not complete. It should include the exact
information you're asking for. I had thought it was already there. Will fix
this right away:
https://github.com/jOOQ/jOOQ/issues/8005
A serialised record needs its field information. If your field is a
TableField from a generated table, then that will in turn include table
information. The current implementation of generated tables does not hold a
direct reference to the schema instance (even if it references it from its
Table.getSchema() implementation), so that shouldn't be serialised.
However, do note, there is no guarantee whatsoever regarding the
serialisation format. The main reason for jOOQ types to be serialisable is
for a simple default behaviour when transferring jOOQ objects over the
network between two parts of an application that use the same jOOQ version.
We do not, for example, guarantee any serialisation format backwards
compatibility.
In your case, as serialised data is not transient but persistent for a
longer period of time, I strongly suggest you do not directly depend on
jOOQ's serialisation format, but use something else instead.
I hope this helps,
Lukas
On Fri, Nov 2, 2018 at 12:02 AM wrote:
> Hi Lukas,
> First of all, thank you for a great library, as well as answering all my
> previous questions :-)
>
> I have a question about serialization. When a record is serialized, what
> exactly does the serialized data include?
> Is it only row-level data such as field values? Or also table schema? Or
> even more?
>
> My use case is that I'd like to serialize query result (a list of records)
> to Memcache. Ideally, I only want row-level data to be serialized, as
> Memcache will be read by the same binary.
> Should I instead go a different route, perhaps work with POJOs instead of
> Records?
>
> Thanks,
> Nikola
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jooq-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.