Menu

#16 Adding a mapping reference removes the DTD declaration

open
nobody
None
5
2008-01-14
2008-01-14
No

Initial hibernate content:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory >

    &lt;\!-- datasource connection properties --&gt;
    &lt;property name="connection.datasource"&gt;jdbc/db&lt;/property&gt;
    &lt;property name="hibernate.jndi.url"&gt;t3://localhost:7001/&lt;/property&gt;

    &lt;\!-- dialect for Oracle \(any version\) --&gt;

<property name="dialect">org.hibernate.dialect.OracleDialect</property>

<property name="hibernate.show_sql">false</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.WeblogicTransactionManagerLookup</property>
</session-factory>
</hibernate-configuration>

-------------------------------------------------------

After adding a mapping reference (through right-click on the mapping file, Hibernate Synchronizer, Adding Mapping Reference):

<hibernate-configuration>
<session-factory>
<!-- datasource connection properties -->
<property name="connection.datasource">jdbc/db</property>
<property name="hibernate.jndi.url">t3://localhost:7001/</property>
<!-- dialect for Oracle (any version) -->
<property name="dialect">
org.hibernate.dialect.OracleDialect
</property>
<property name="hibernate.show_sql">false</property>
<property name="hibernate.transaction.factory_class">
org.hibernate.transaction.WeblogicTransactionManagerLookup
</property>
<mapping resource="TMapping.hbm.xml" />
</session-factory>
</hibernate-configuration>

-------------------------------------------------------

The <?xml ...?> tag has been removed, as well as the DOCTYPE/DTD declaration.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.