I'd like to add user-defined custom fields to an existing entity in EclipseLink. For performance reasons, I want them to be stored directly in the entity's table, and I also want them to be "first class citizens", i.e. usable in queries.
From an implementation standpoint, the entity should have two methods to set and get custom fields:
public Object getCustomProperty(String key) { ... }
public void setCustomProperty(String key, Object value) { ... }
When setting a custom property foo
, EclipseLink should store the value in the entity's table in a field named custom_foo
.
From an end user standpoint, I would like to provide a GUI where the user can define and manage custom fields, which are then dynamically added to or removed from the database.
Is this possible in EclipseLink?
Regards, Jochen