Skip to content

serializable types as basic types #1161

Description

@gavinking

Since 1.0, the Persistence spec has said that any un-annotated field is basic by default, and also provided a fall-through to Java serialization for unrecognized basic types.

This is a misfeature.

  • Storing serialized Java objects in the database is almost always a rubbish thing to do.
  • The fall-through prevents the provider from providing meaningful error reports for unrecognized types, or when mapping annotations are missing.
  • In case a user really wants this, it's quite straightforward to provide an AttributeConverter.

So I think we should at least deprecate this, and perhaps even consider having some way to just turn this "feature" off.

Thoughts?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions