[ 
http://mifosforge.jira.com/browse/MIFOS-2696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

keithwoodlock updated MIFOS-2696:
---------------------------------

    Fix Version/s:     (was: Mifos Backlog)
                   Unscheduled

> Migrate from Hibernate XML configuratation to JPA/Entity Annotations based 
> configuration
> ----------------------------------------------------------------------------------------
>
>                 Key: MIFOS-2696
>                 URL: http://mifosforge.jira.com/browse/MIFOS-2696
>             Project: mifos
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: Unscheduled
>            Reporter: Udai Gupta
>            Assignee: mifosdeveloperqueue
>              Labels: volunteer
>             Fix For: Unscheduled
>
>         Attachments: hbm2jpaPOJOfromMIFOShbm.zip, HBMxml2AnnotationsHint.patch
>
>
> Hibernate, like all other object/relational mapping tools, requires metadata 
> that governs the transformation of data from one representation to the other. 
> In Hibernate 2.x mapping metadata is most of the time declared in XML text 
> files. Alternatively XDoclet can be used utilizing Javadoc source code 
> annotations together with a compile time preprocessor.
> The same kind of annotation support is now available in the standard JDK, 
> although more powerful and with better tools support. IntelliJ IDEA and 
> Eclipse for example, support auto-completion and syntax highlighting of JDK 
> 5.0 annotations which are compiled into the bytecode and read at runtime 
> using reflection. No external XML files are needed.
> The EJB3 specification recognizes the interest and the success of the 
> transparent object/relational mapping paradigm. It standardizes the basic 
> APIs and the metadata needed for any object/relational persistence mechanism. 
> Hibernate EntityManager implements the programming interfaces and lifecycle 
> rules as defined by the EJB3 persistence specification and together with 
> Hibernate Annotations offers a complete (and standalone) EJB3 persistence 
> solution on top of the mature Hibernate core.
> http://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single
> There is patch attached with this issue showing how this can be achieved with 
> least modification.
> There is zip file attached with this issue which contain pojo generated by 
> hibernate tool (with EJB3 and JDK5)
> https://www.hibernate.org/hib_docs/tools/reference/en/html_single/#d0e1193
> We can not use this generated code because
>  - These POJO might be incomplete, for example query (named queries) are not 
> add due to http://opensource.atlassian.com/projects/hibernate/browse/HBX-465, 
> but adding named queries are quite simple using annotations
>  - The Classes in Mifos might not be clean POJO (which is bad but for now we 
> have to live with that)
>  - We have to be very careful while applying the annotations and removing 
> respective xml config file so that meta-data for hibernate remains same.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to