[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-5533) Entity Manager documentation: example at the end of the bootstrapping section is invalid
Kariem Hussein (JIRA)
noreply at atlassian.com
Fri Sep 3 19:34:18 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kariem Hussein updated HHH-5533:
--------------------------------
Attachment: docbook-en-modules-configuration.diff
Attaching patch to resolve the problems outlined in the description. The patch is agains r20306 of {{/core/trunk/entitymanager/src/main/docbook/en/modules/configuration.xml}}
> Entity Manager documentation: example at the end of the bootstrapping section is invalid
> ----------------------------------------------------------------------------------------
>
> Key: HHH-5533
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5533
> Project: Hibernate Core
> Issue Type: Patch
> Components: documentation, entity-manager
> Reporter: Kariem Hussein
> Attachments: docbook-en-modules-configuration.diff
>
>
> The example at the end of the [bootstrapping section of the entity manager documentation|http://docs.jboss.org/hibernate/stable/entitymanager/reference/en/html/configuration.html#setup-configuration-bootstrapping] contains syntax errors and invalid method calls.
> *Current version*
> {code}
> Ejb3Configuration cfg = new Ejb3Configuration();
> EntityManagerFactory emf =
> cfg.addProperties( properties ) //add some properties
> .setInterceptor( myInterceptorImpl ) // set an interceptor
> .addAnnotatedClass( MyAnnotatedClass.class ) //add a class to be mapped
> .addClass( NonAnnotatedClass.class ) //add an hbm.xml file using the Hibernate convention
> .addRerousce( "mypath/MyOtherCLass.hbm.xml ) //add an hbm.xml file
> .addRerousce( "mypath/orm.xml ) //add an EJB3 deployment descriptor
> .configure("/mypath/hibernate.cfg.xml") //add a regular hibernate.cfg.xml
> .buildEntityManagerFactory(); //Create the entity manager factory
> {code}
> *Problems*
> - {{addRerousce}} instead of {{addResource}}
> - strings are not properly closed in lines 7 and 8
> - formatting is not consistent (capitalization, spacing)
> - comments are not aligned
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list