[hibernate-dev] dynamic entities
Iyad Elian
iyadelian at yahoo.com
Mon Apr 30 15:48:20 EDT 2007
Hi hibernate-dev,
I have an interest in modifying hibernate core to support an
alternative persistence model common in some domains like the medical
domain. how do I go about it?
here is a small description of the problem and a solution:
problem:
Objects map one to one to tables as specified at design time which is
normally what most applications require. Object relational mapping
runtimes like hibernate core cater well for this common case. However,
some applications require a catalog of entities and their attributes.
Other applications require a more dynamic mapping to a set of few
fixed tables regardless of the number of domain objects.
solution:
Persist entities to an EAVCR meta-model which stores values of
attributes in a generic Data table. The values can only be stored as a
generic type (String) but types can be tightened at runtime. This also
means that all dynamic entities, heterogeneous as they maybe, are
stored in one table and cataloged by a few more. Using such model
complicates the native SQL to access the data so it maybe necessary to
map the SQL to hide such complexity. Fortunately, domains using this
model require entity centric queries (load all data for a patient)
which is more coarse grained.
does this sound interesting to anyone on this list?
Thanks.
--Iyad
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-dev/attachments/20070430/d7b275d4/attachment.html
More information about the hibernate-dev
mailing list