dynamic fields implementation

2 messages Options
Embed this post
Permalink
Rajeev Goel

dynamic fields implementation

Reply Threaded More More options
Print post
Permalink
hi All,

I would like to implement dynamic field functionality for my hibernate + spring based application.

- user should be able to add additional fields (not defined during initial system design)
- fields can be added without restarting server
- preferably fields could be of specific data type (String, boolean, integer, etc). Else they could all be string and front-end layer can format it.

Additional information:
- using Hibernate 3.2 with annotations (JPA).
- dynamicComponent configuration is available only with hbm.xml (old way). We would preferably like to continue with JPA.
- our domain is quite rich, approach shouldn't be too narrow.

If you know of any concrete approaches for the same, please let me know.

thanks in advance,
have a great day !

Rajeev
Oscar Alvarez-2

Re: dynamic fields implementation

Reply Threaded More More options
Print post
Permalink
HI.

You can design an extra entity that holds new fields... and references your initial system design entity...
An example of that may be looks like:

ExtraData(id, idReferencedEntity, nameReferencedEntity, fieldType, fieldName, fieldValue)

And adicionally you may be need some extra java classes to translate it to the right java data type...

HTH
Oscar

2009/6/22 Rajeev Goel <[hidden email]>
hi All,

I would like to implement dynamic field functionality for my hibernate + spring based application.

- user should be able to add additional fields (not defined during initial system design)
- fields can be added without restarting server
- preferably fields could be of specific data type (String, boolean, integer, etc). Else they could all be string and front-end layer can format it.

Additional information:
- using Hibernate 3.2 with annotations (JPA).
- dynamicComponent configuration is available only with hbm.xml (old way). We would preferably like to continue with JPA.
- our domain is quite rich, approach shouldn't be too narrow.

If you know of any concrete approaches for the same, please let me know.

thanks in advance,
have a great day !

Rajeev



--
Atentamente
Óscar Álvarez Vielma
(09) 8416 4052