Hi,
  Interesting discussion.
  Time and again this discussion comes up with persistence of semi-strictly
typed (or relaxed-type, in my preferred nomenclature) data. Some prefer XML,
some a Java Map, while I have seen the adventurous venture into dynamic
bytecode generation as well. 
   My view is that the representational choice somewhat depends on what kind
of query support one needs on the data that comes from a relaxed-type
environment. If the application needs full query support on the properties
of the datum (quite expected -- otherwise why it needs to store it in a
database anyway?), some mechanics must convert the relaxed-type data to
strict-typed POJO -- rest can then be taken care of by a JPA provider. 

   A powerful bytecode generation library works within OpenJPA  to make
dynamic class generation a feasible approach. For XML data, a plug-in called
Fluid is available which has been reportedly used for production systems. 

  Daryl described a mapping based solution in this post --  which sounded
interesting. Will like to know more details if that is sharable/public. If
you find the Map-based approach addresses your need -- it will be good for
the community if you share that design.   

    
    

crispyoz wrote:
> 
> Hi Daryl,
> 
>  
> 
> I just took out my pencil and paper ad drew out the process based on your
> recommendation and Lairds. A map makes a whole load of sense because it
> means I can add anything I want at run time without getting involved in
> dynamic class generation and runtime enhancement etc etc .etc ...
> 
>  
> 
> For report generation I can normalise the data in my SQL that feeds the
> report module. Easy !
> 
>  
> 
> Thanks so much for advice!  I was right in one respect  "I might be
> thinking
> in the wrong direction .."
> 
>  
> 
> Chris
> 
>  
> 
> From: Daryl Stultz [mailto:[email protected]] 
> Sent: Friday, 24 July 2009 3:01 AM
> To: [email protected]; [email protected]
> Subject: Re: Dynamic entity definition creation - is it possible?
> 
>  
> 
> On Thu, Jul 23, 2009 at 12:55 PM, C N Davies <[email protected]> wrote:
> 
> Hi Laird,
> 
> You may well be right
> 
>  
> 
> WHOA! Laird gets credit? I suggested that in my second post. (Actually my
> first post describes a Map but I didn't spell it out.)
> 
>  
> 
> I'm just kidding, everyone.
> 
> 
> -- 
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:[email protected]
> 
> 
> 


-----
Pinaki 
-- 
View this message in context: 
http://n2.nabble.com/Dynamic-entity-definition-creation---is-it-possible--tp3310100p3313464.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to