Fix null dicriminator unable to cast MarkerObject to ...

This commit is contained in:
Andrea Boriero 2021-06-28 15:07:11 +02:00
parent ce752c1428
commit 8895347867
180 changed files with 665 additions and 644 deletions

View File

@ -6,9 +6,6 @@
*/ */
package org.hibernate.userguide.envers; package org.hibernate.userguide.envers;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -26,11 +23,10 @@ import org.hibernate.envers.AuditReaderFactory;
import org.hibernate.envers.Audited; import org.hibernate.envers.Audited;
import org.hibernate.envers.configuration.EnversSettings; import org.hibernate.envers.configuration.EnversSettings;
import org.hibernate.envers.query.AuditEntity; import org.hibernate.envers.query.AuditEntity;
import org.hibernate.envers.query.AuditQuery;
import org.hibernate.envers.strategy.ValidityAuditStrategy; import org.hibernate.envers.strategy.ValidityAuditStrategy;
import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase; import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase;
import org.hibernate.test.legacy.Custom; import org.hibernate.orm.test.legacy.Custom;
import org.junit.Test; import org.junit.Test;
import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.hibernate.testing.transaction.TransactionUtil.doInJPA;

View File

@ -13,7 +13,7 @@
<property name="show_sql">true</property> <property name="show_sql">true</property>
<mapping resource="org/hibernate/test/legacy/Simple.hbm.xml"/> <mapping resource="org/hibernate/test/legacy/Simple.hbm.xml"/>
<class-cache <class-cache
class="org.hibernate.test.legacy.Simple" class="org.hibernate.orm.test.legacy.Simple"
region="Simple" region="Simple"
usage="read-write"/> usage="read-write"/>
</session-factory> </session-factory>

View File

@ -27,11 +27,11 @@ import org.hibernate.jdbc.Work;
import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.RequiresDialect;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.hibernate.test.legacy.Blobber; import org.hibernate.orm.test.legacy.Blobber;
import org.hibernate.test.legacy.Broken; import org.hibernate.orm.test.legacy.Broken;
import org.hibernate.test.legacy.Fixed; import org.hibernate.orm.test.legacy.Fixed;
import org.hibernate.test.legacy.Simple; import org.hibernate.orm.test.legacy.Simple;
import org.hibernate.test.legacy.Single; import org.hibernate.orm.test.legacy.Single;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;

View File

@ -57,6 +57,7 @@ import org.hibernate.sql.ast.tree.from.TableGroup;
import org.hibernate.sql.ast.tree.predicate.ComparisonPredicate; import org.hibernate.sql.ast.tree.predicate.ComparisonPredicate;
import org.hibernate.sql.ast.tree.predicate.InListPredicate; import org.hibernate.sql.ast.tree.predicate.InListPredicate;
import org.hibernate.sql.ast.tree.predicate.Junction; import org.hibernate.sql.ast.tree.predicate.Junction;
import org.hibernate.sql.ast.tree.predicate.NegatedPredicate;
import org.hibernate.sql.ast.tree.predicate.NullnessPredicate; import org.hibernate.sql.ast.tree.predicate.NullnessPredicate;
import org.hibernate.sql.ast.tree.predicate.Predicate; import org.hibernate.sql.ast.tree.predicate.Predicate;
import org.hibernate.type.AssociationType; import org.hibernate.type.AssociationType;
@ -1018,13 +1019,21 @@ public class SingleTableEntityPersister extends AbstractEntityPersister {
} }
return p; return p;
} }
final Object value = getDiscriminatorValue();
final boolean hasNotNullDiscriminator = value == NOT_NULL_DISCRIMINATOR;
final boolean hasNullDiscrininator = value == NULL_DISCRIMINATOR;
if ( hasNotNullDiscriminator || hasNullDiscrininator ) {
final NullnessPredicate nullnessPredicate = new NullnessPredicate( sqlExpression );
if ( hasNotNullDiscriminator ) {
return new NegatedPredicate( nullnessPredicate );
}
return nullnessPredicate;
}
return new ComparisonPredicate( return new ComparisonPredicate(
sqlExpression, sqlExpression,
ComparisonOperator.EQUAL, ComparisonOperator.EQUAL,
new QueryLiteral<>( new QueryLiteral<>( value, discriminatorType )
getDiscriminatorValue(),
discriminatorType
)
); );
} }

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
public class A { public class A {
private Long id; private Long id;

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.A" discriminator-value="0" lazy="true" table="TA"> <class name="org.hibernate.orm.test.legacy.A" discriminator-value="0" lazy="true" table="TA">
<id name = "id" column="identifier_column" unsaved-value = "null"> <id name = "id" column="identifier_column" unsaved-value = "null">
<generator class="increment"/> <generator class="increment"/>
</id> </id>
@ -20,13 +20,13 @@
<column name="name" index="indx_a_name2"/> <column name="name" index="indx_a_name2"/>
</property> </property>
<subclass name="org.hibernate.test.legacy.B" discriminator-value="-1" lazy="true"> <subclass name="org.hibernate.orm.test.legacy.B" discriminator-value="-1" lazy="true">
<property name="count" column="count_"/> <property name="count" column="count_"/>
<join fetch="select" table="B2"> <join fetch="select" table="B2">
<key column="bid"/> <key column="bid"/>
<property name="BName" not-null="true"/> <property name="BName" not-null="true"/>
</join> </join>
<subclass name="org.hibernate.test.legacy.C1" discriminator-value="null" lazy="true"> <subclass name="org.hibernate.orm.test.legacy.C1" discriminator-value="null" lazy="true">
<property name="address" column="c1"/> <property name="address" column="c1"/>
<one-to-one name="d"/> <one-to-one name="d"/>
<join table="cmore" fetch="select"> <join table="cmore" fetch="select">
@ -37,7 +37,7 @@
</subclass> </subclass>
</class> </class>
<class name="org.hibernate.test.legacy.D" discriminator-value="0" proxy="org.hibernate.test.legacy.D" table="TD"> <class name="org.hibernate.orm.test.legacy.D" discriminator-value="0" proxy="org.hibernate.orm.test.legacy.D" table="TD">
<id name = "id" unsaved-value = "null"> <id name = "id" unsaved-value = "null">
<generator class="assigned"/> <generator class="assigned"/>
</id> </id>
@ -54,7 +54,7 @@
</class> </class>
<sql-query name="propertyResultDiscriminator"> <sql-query name="propertyResultDiscriminator">
<return alias="a" class="org.hibernate.test.legacy.A"> <return alias="a" class="org.hibernate.orm.test.legacy.A">
<return-discriminator column="clazz"/> <return-discriminator column="clazz"/>
<return-property name="id" column="identifier_column"/> <return-property name="id" column="identifier_column"/>
<return-property name="name" column="name"/> <return-property name="name" column="name"/>

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<subclass name="org.hibernate.test.legacy.C2" discriminator-value="2" extends="org.hibernate.test.legacy.B" lazy="true"> <subclass name="org.hibernate.orm.test.legacy.C2" discriminator-value="2" extends="org.hibernate.orm.test.legacy.B" lazy="true">
<property name="address" column="c2"/> <property name="address" column="c2"/>
<join table="c2more" fetch="select"> <join table="c2more" fetch="select">
<key column="c2"/> <key column="c2"/>

View File

@ -10,14 +10,14 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.A" discriminator-value="0" lazy="true" table="AP"> <class name="org.hibernate.orm.test.legacy.A" discriminator-value="0" lazy="true" table="AP">
<id name="id" column="identifier_column" unsaved-value = "null"> <id name="id" column="identifier_column" unsaved-value = "null">
<generator class="increment"/> <generator class="increment"/>
</id> </id>
<discriminator column="clazz_discriminata" type="integer" force="true" not-null="false"/> <discriminator column="clazz_discriminata" type="integer" force="true" not-null="false"/>
<property name="name"/> <property name="name"/>
<many-to-one name="forward" class="org.hibernate.test.legacy.E" cascade="save-update" /> <many-to-one name="forward" class="org.hibernate.orm.test.legacy.E" cascade="save-update" />
<subclass name="org.hibernate.test.legacy.B" discriminator-value="null" lazy="true"> <subclass name="org.hibernate.orm.test.legacy.B" discriminator-value="null" lazy="true">
<property name="count" column="count_"/> <property name="count" column="count_"/>
<map name="map" table="`map`"> <map name="map" table="`map`">
@ -26,42 +26,42 @@
<element column="MAPVAL" type="int"/> <element column="MAPVAL" type="int"/>
</map> </map>
<subclass name="org.hibernate.test.legacy.C1" discriminator-value="1" lazy="true"> <subclass name="org.hibernate.orm.test.legacy.C1" discriminator-value="1" lazy="true">
<property name="address" column="c1"/> <property name="address" column="c1"/>
<one-to-one name="d"/> <one-to-one name="d"/>
<many-to-one name="c2" column="c" class="org.hibernate.test.legacy.C2"/> <many-to-one name="c2" column="c" class="org.hibernate.orm.test.legacy.C2"/>
<bag name="c2s" inverse="true" where="identifier_column is not null"> <!--where="clazz_discriminata=2"--> <bag name="c2s" inverse="true" where="identifier_column is not null"> <!--where="clazz_discriminata=2"-->
<key column="c"/> <key column="c"/>
<one-to-many class="org.hibernate.test.legacy.C2"/> <one-to-many class="org.hibernate.orm.test.legacy.C2"/>
</bag> </bag>
</subclass> </subclass>
<subclass name="org.hibernate.test.legacy.C2" discriminator-value="2" lazy="true"> <subclass name="org.hibernate.orm.test.legacy.C2" discriminator-value="2" lazy="true">
<property name="address" column="c2"/> <property name="address" column="c2"/>
<many-to-one name="c1" column="c" class="org.hibernate.test.legacy.C1"/> <many-to-one name="c1" column="c" class="org.hibernate.orm.test.legacy.C1"/>
<bag name="c1s" inverse="true" > <!--where="clazz_discriminata=1"--> <bag name="c1s" inverse="true" > <!--where="clazz_discriminata=1"-->
<key column="c"/> <key column="c"/>
<one-to-many class="org.hibernate.test.legacy.C1"/> <one-to-many class="org.hibernate.orm.test.legacy.C1"/>
</bag> </bag>
</subclass> </subclass>
</subclass> </subclass>
</class> </class>
<class name="org.hibernate.test.legacy.D" discriminator-value="0" lazy="true" table="DP"> <class name="org.hibernate.orm.test.legacy.D" discriminator-value="0" lazy="true" table="DP">
<id name = "id" unsaved-value = "null"> <id name = "id" unsaved-value = "null">
<generator class="assigned"/> <generator class="assigned"/>
</id> </id>
<property name="amount"/> <property name="amount"/>
</class> </class>
<class name="org.hibernate.test.legacy.E" discriminator-value="0" lazy="true" table="EP"> <class name="org.hibernate.orm.test.legacy.E" discriminator-value="0" lazy="true" table="EP">
<id name = "id" unsaved-value = "null"> <id name = "id" unsaved-value = "null">
<generator class="increment"/> <generator class="increment"/>
</id> </id>
<property name="amount"/> <property name="amount"/>
<one-to-one name="reverse" class="org.hibernate.test.legacy.A" property-ref="forward" cascade="save-update"/> <one-to-one name="reverse" class="org.hibernate.orm.test.legacy.A" property-ref="forward" cascade="save-update"/>
<set name="as" lazy="true"> <set name="as" lazy="true">
<key column="e"/> <key column="e"/>
<one-to-many class="org.hibernate.test.legacy.A"/> <one-to-many class="org.hibernate.orm.test.legacy.A"/>
</set> </set>
</class> </class>

View File

@ -0,0 +1,185 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.orm.test.legacy;
import java.util.Iterator;
import java.util.List;
import org.hibernate.Cache;
import org.hibernate.boot.model.naming.Identifier;
import org.hibernate.mapping.Index;
import org.hibernate.mapping.Table;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.SessionFactory;
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
@DomainModel(
xmlMappings = {
"org/hibernate/orm/test/legacy/ABC.hbm.xml", "org/hibernate/orm/test/legacy/ABCExtends.hbm.xml"
}
)
@SessionFactory
public class ABCTest {
@Test
public void testFormulaAssociation(SessionFactoryScope scope) {
Long did = 12L;
scope.inTransaction(
session -> {
D d = new D( did );
session.save( d );
A a = new A();
a.setName( "a" );
session.save( a );
d.setReverse( a );
d.inverse = a;
}
);
scope.inTransaction(
session -> {
D d = session.get( D.class, did );
assertNotNull( d.getReverse() );
session.clear();
getCache( scope ).evictEntityData( D.class );
getCache( scope ).evictEntityData( A.class );
d = session.get( D.class, did );
assertNotNull( d.inverse );
assertThat( d.inverse.getName(), is( "a" ) );
session.clear();
getCache( scope ).evictEntityData( D.class );
getCache( scope ).evictEntityData( A.class );
assertThat(
session.createQuery( "from D d join d.reverse r join d.inverse i where i = r" )
.list().size(),
is( 1 )
);
}
);
}
@Test
public void testHigherLevelIndexDefinition(SessionFactoryScope scope) {
Table table = scope.getMetadataImplementor()
.getDatabase()
.getDefaultNamespace()
.locateTable( Identifier.toIdentifier( "TA" ) );
Iterator<Index> indexItr = table.getIndexIterator();
boolean found = false;
while ( indexItr.hasNext() ) {
final Index index = indexItr.next();
if ( "indx_a_name".equals( index.getName() ) ) {
found = true;
break;
}
}
assertTrue( found, "Unable to locate indx_a_name index" );
}
@Test
public void testSubclassing(SessionFactoryScope scope) {
C1 c = new C1();
scope.inTransaction(
session -> {
D d = new D();
d.setAmount( 213.34f );
c.setAddress( "foo bar" );
c.setCount( 23432 );
c.setName( "c1" );
c.setBName( "a funny name" );
c.setD( d );
session.save( c );
d.setId( c.getId() );
session.save( d );
assertThat( session.createQuery( "from C2 c where 1=1 or 1=1" ).list().size(), is( 0 ) );
}
);
getCache( scope ).evictEntityData( A.class );
scope.inTransaction(
session -> {
C1 c1 = (C1) session.get( A.class, c.getId() );
assertTrue(
c1.getAddress().equals( "foo bar" ) &&
( c1.getCount() == 23432 ) &&
c1.getName().equals( "c1" ) &&
c1.getD().getAmount() > 213.3f
);
assertThat( c1.getBName(), is( "a funny name" ) );
}
);
getCache( scope ).evictEntityData( A.class );
scope.inTransaction(
session -> {
C1 c1 = (C1) session.get( B.class, c.getId() );
assertTrue(
c1.getAddress().equals( "foo bar" ) &&
( c1.getCount() == 23432 ) &&
c1.getName().equals( "c1" ) &&
c1.getD().getAmount() > 213.3f
);
assertThat( c1.getBName(), is( "a funny name" ) );
}
);
scope.inTransaction(
session -> {
C1 c1 = session.load( C1.class, c.getId() );
assertTrue(
c1.getAddress().equals( "foo bar" ) &&
( c1.getCount() == 23432 ) &&
c1.getName().equals( "c1" ) &&
c1.getD().getAmount() > 213.3f
);
}
);
scope.inTransaction(
session -> {
List<C1> bs = session.createQuery( "from B" ).list();
for ( C1 b : bs ) {
session.delete( b );
session.delete( b.getD() );
}
}
);
}
@Test
public void testGetSave(SessionFactoryScope scope) {
scope.inTransaction(
session -> {
assertNull( session.get( D.class, 1L ) );
D d = new D();
d.setId( 1L );
session.save( d );
session.flush();
assertNotNull( session.get( D.class, 1L ) );
session.delete( d );
session.flush();
}
);
}
private Cache getCache(SessionFactoryScope scope) {
return scope.getSessionFactory().getCache();
}
}

View File

@ -6,7 +6,8 @@
*/ */
//$Id: Abstract.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Abstract.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.Set; import java.util.Set;
public abstract class Abstract extends Foo implements AbstractProxy { public abstract class Abstract extends Foo implements AbstractProxy {

View File

@ -4,14 +4,13 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
public interface AbstractProxy extends FooProxy { public interface AbstractProxy extends FooProxy {
public void setAbstracts(java.util.Set arg0); void setAbstracts(java.util.Set arg0);
public java.util.Set getAbstracts(); java.util.Set getAbstracts();
public void setTime(java.sql.Time arg0); void setTime(java.sql.Time arg0);
public java.sql.Time getTime(); java.sql.Time getTime();
} }

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Simple" table="SIMP"> <class name="org.hibernate.orm.test.legacy.Simple" table="SIMP">
<id name="id" type="long" column="id_"> <id name="id" type="long" column="id_">
<generator class="assigned"/> <generator class="assigned"/>
</id> </id>

View File

@ -4,7 +4,8 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.Collection; import java.util.Collection;
/** /**

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.Map; import java.util.Map;

View File

@ -6,8 +6,7 @@
*/ */
//$Id: Bar.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Bar.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
public class Bar extends Abstract implements BarProxy, Named { public class Bar extends Abstract implements BarProxy, Named {
private String barString; private String barString;

View File

@ -6,18 +6,18 @@
*/ */
//$Id: BarProxy.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: BarProxy.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
public interface BarProxy extends AbstractProxy { public interface BarProxy extends AbstractProxy {
public void setBaz(Baz arg0); void setBaz(Baz arg0);
public Baz getBaz(); Baz getBaz();
public void setBarComponent(FooComponent arg0); void setBarComponent(FooComponent arg0);
public FooComponent getBarComponent(); FooComponent getBarComponent();
//public void setBarString(String arg0); //public void setBarString(String arg0);
public String getBarString(); String getBarString();
public Object getObject(); Object getObject();
public void setObject(Object o); void setObject(Object o);
} }

View File

@ -6,7 +6,7 @@
*/ */
//$Id: BasicNameable.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: BasicNameable.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Baz" <class name="org.hibernate.orm.test.legacy.Baz"
table="baz" table="baz"
check="count_count > -666"> check="count_count > -666">
<id name="code" type="string"> <id name="code" type="string">
@ -20,7 +20,7 @@
<property name="count" column="count_count"/> <property name="count" column="count_count"/>
<property name="name" column="name_b"/> <property name="name" column="name_b"/>
<!--property name="text" type="text" column="text_"/--> <!--property name="text" type="text" column="text_"/-->
<many-to-one name="foo" outer-join="true" class="org.hibernate.test.legacy.Foo"/> <many-to-one name="foo" outer-join="true" class="org.hibernate.orm.test.legacy.Foo"/>
<list name="stringList" table="string_list" batch-size="12"> <list name="stringList" table="string_list" batch-size="12">
<key> <key>
@ -40,20 +40,20 @@
<key> <key>
<column name="baz_id" length="16"/> <column name="baz_id" length="16"/>
</key> </key>
<one-to-many class="org.hibernate.test.legacy.Foo"/> <one-to-many class="org.hibernate.orm.test.legacy.Foo"/>
</set> </set>
<array name="components" table="bazcomponents"> <array name="components" table="bazcomponents">
<key> <key>
<column name="baz_id" length="16"/> <column name="baz_id" length="16"/>
</key> </key>
<index column="i"/> <index column="i"/>
<composite-element class="org.hibernate.test.legacy.FooComponent"> <composite-element class="org.hibernate.orm.test.legacy.FooComponent">
<parent name="baz"/> <parent name="baz"/>
<property name="name"> <property name="name">
<column name="name" length="56"/> <column name="name" length="56"/>
</property> </property>
<property name="count" column="count_"/> <property name="count" column="count_"/>
<nested-composite-element name="subcomponent" class="org.hibernate.test.legacy.FooComponent"> <nested-composite-element name="subcomponent" class="org.hibernate.orm.test.legacy.FooComponent">
<property name="name" column="x_"/> <property name="name" column="x_"/>
<property name="count" column="y_"/> <property name="count" column="y_"/>
</nested-composite-element> </nested-composite-element>
@ -76,52 +76,52 @@
<key> <key>
<column name="baz_id" length="16"/> <column name="baz_id" length="16"/>
</key> </key>
<index-many-to-many column="foo_id" class="org.hibernate.test.legacy.Foo"/> <index-many-to-many column="foo_id" class="org.hibernate.orm.test.legacy.Foo"/>
<many-to-many column="glarch_id" class="org.hibernate.test.legacy.Glarch"/> <many-to-many column="glarch_id" class="org.hibernate.orm.test.legacy.Glarch"/>
</map> </map>
<map name="fooComponentToFoo"> <map name="fooComponentToFoo">
<!--cache--> <!--cache-->
<key> <key>
<column name="baz_id" length="16"/> <column name="baz_id" length="16"/>
</key> </key>
<composite-index class="org.hibernate.test.legacy.FooComponent"> <composite-index class="org.hibernate.orm.test.legacy.FooComponent">
<key-property name="name" length="32"/> <key-property name="name" length="32"/>
<key-property name="count" column="count_"/> <key-property name="count" column="count_"/>
</composite-index> </composite-index>
<many-to-many column="foo_id" class="org.hibernate.test.legacy.Foo" outer-join="true"/> <many-to-many column="foo_id" class="org.hibernate.orm.test.legacy.Foo" outer-join="true"/>
</map> </map>
<map name="glarchToFoo"> <map name="glarchToFoo">
<key> <key>
<column name="gtf_baz_id" length="16"/> <column name="gtf_baz_id" length="16"/>
</key> </key>
<index-many-to-many column="gtf_foo_id" class="org.hibernate.test.legacy.Foo"/> <index-many-to-many column="gtf_foo_id" class="org.hibernate.orm.test.legacy.Foo"/>
<one-to-many class="org.hibernate.test.legacy.Glarch"/> <one-to-many class="org.hibernate.orm.test.legacy.Glarch"/>
</map> </map>
<set name="stringSet" lazy="true" sort="org.hibernate.test.legacy.StringComparator" batch-size="12"> <set name="stringSet" lazy="true" sort="org.hibernate.orm.test.legacy.StringComparator" batch-size="12">
<!--<cache usage="read-write"/>--> <!--<cache usage="read-write"/>-->
<key column="id_"/> <key column="id_"/>
<element column="element" type="string" not-null="true" length="32"/> <element column="element" type="string" not-null="true" length="32"/>
</set> </set>
<map name="stringDateMap" lazy="true" sort="org.hibernate.test.legacy.ReverseComparator"> <map name="stringDateMap" lazy="true" sort="org.hibernate.orm.test.legacy.ReverseComparator">
<key column="id_"/> <key column="id_"/>
<index column="map_key" type="string" length="32"/> <index column="map_key" type="string" length="32"/>
<element column="map_value" type="date"/> <element column="map_value" type="date"/>
</map> </map>
<array name="fooArray" table="FOO_ARRAY" element-class="org.hibernate.test.legacy.FooProxy" where="i&lt;8" check="i>=0"> <array name="fooArray" table="FOO_ARRAY" element-class="org.hibernate.orm.test.legacy.FooProxy" where="i&lt;8" check="i>=0">
<!--cache--> <!--cache-->
<key column="id_"/> <key column="id_"/>
<index column="i"/> <index column="i"/>
<many-to-many class="org.hibernate.test.legacy.Foo" fetch="select"> <many-to-many class="org.hibernate.orm.test.legacy.Foo" fetch="select">
<column name="foo" length="36"/> <column name="foo" length="36"/>
</many-to-many> </many-to-many>
</array> </array>
<bag name="fooBag" lazy="true" table="baz_foo" cascade="all-delete-orphan" inverse="false"> <bag name="fooBag" lazy="true" table="baz_foo" cascade="all-delete-orphan" inverse="false">
<key column="baz"/> <key column="baz"/>
<many-to-many class="org.hibernate.test.legacy.Foo" column="foo" outer-join="true"/> <many-to-many class="org.hibernate.orm.test.legacy.Foo" column="foo" outer-join="true"/>
</bag> </bag>
<idbag name="idFooBag" lazy="true" table="baz_id_foo" cascade="all"> <idbag name="idFooBag" lazy="true" table="baz_id_foo" cascade="all">
@ -129,7 +129,7 @@
<generator class="increment"/> <generator class="increment"/>
</collection-id> </collection-id>
<key column="baz"/> <key column="baz"/>
<many-to-many class="org.hibernate.test.legacy.Foo" column="foo" outer-join="true"/> <many-to-many class="org.hibernate.orm.test.legacy.Foo" column="foo" outer-join="true"/>
</idbag> </idbag>
<idbag name="byteBag" lazy="true" table="baz_byte_bag"> <idbag name="byteBag" lazy="true" table="baz_byte_bag">
@ -149,14 +149,14 @@
<list name="fees" lazy="true" cascade="all" check="bazind is null or (bazind>=0 and bazind&lt;10)"> <list name="fees" lazy="true" cascade="all" check="bazind is null or (bazind>=0 and bazind&lt;10)">
<key column="bazid"/> <key column="bazid"/>
<index column="bazind"/> <index column="bazind"/>
<one-to-many class="org.hibernate.test.legacy.Fee"/> <one-to-many class="org.hibernate.orm.test.legacy.Fee"/>
</list> </list>
<list name="topComponents" table="topcomponents"> <list name="topComponents" table="topcomponents">
<!--cache--> <!--cache-->
<key column="id_"/> <key column="id_"/>
<index column="i"/> <index column="i"/>
<composite-element class="org.hibernate.test.legacy.FooComponent"> <composite-element class="org.hibernate.orm.test.legacy.FooComponent">
<property name="name"/> <property name="name"/>
<property name="count" column="count_"/> <property name="count" column="count_"/>
</composite-element> </composite-element>
@ -164,12 +164,12 @@
<set name="topFoos"> <set name="topFoos">
<key column="idtopbar" /> <key column="idtopbar" />
<one-to-many class = "org.hibernate.test.legacy.Bar"/> <one-to-many class = "org.hibernate.orm.test.legacy.Bar"/>
</set> </set>
<set name="cascadingBars" cascade="all-delete-orphan"> <set name="cascadingBars" cascade="all-delete-orphan">
<key column="idofbaz" /> <key column="idofbaz" />
<one-to-many class = "org.hibernate.test.legacy.Bar"/> <one-to-many class = "org.hibernate.orm.test.legacy.Bar"/>
</set> </set>
<map name="topGlarchez" outer-join="true"> <map name="topGlarchez" outer-join="true">
@ -177,13 +177,13 @@
<index type="character"> <index type="character">
<column name="mapkey" sql-type="char(1)"/> <column name="mapkey" sql-type="char(1)"/>
</index> </index>
<one-to-many class = "org.hibernate.test.legacy.Glarch"/> <one-to-many class = "org.hibernate.orm.test.legacy.Glarch"/>
</map> </map>
<set name="cached" sort="natural" table="cached_set"> <set name="cached" sort="natural" table="cached_set">
<!--cache--> <!--cache-->
<key column="baz"/> <key column="baz"/>
<composite-element class="org.hibernate.test.legacy.CompositeElement"> <composite-element class="org.hibernate.orm.test.legacy.CompositeElement">
<property name="foo" not-null="true"/> <property name="foo" not-null="true"/>
<property name="bar" not-null="true"/> <property name="bar" not-null="true"/>
</composite-element> </composite-element>
@ -192,8 +192,8 @@
<map name="cachedMap" sort="natural" table="cached_map"> <map name="cachedMap" sort="natural" table="cached_map">
<!--cache--> <!--cache-->
<key column="baz"/> <key column="baz"/>
<index-many-to-many column="another_baz" class="org.hibernate.test.legacy.Baz"/> <index-many-to-many column="another_baz" class="org.hibernate.orm.test.legacy.Baz"/>
<composite-element class="org.hibernate.test.legacy.CompositeElement"> <composite-element class="org.hibernate.orm.test.legacy.CompositeElement">
<property name="foo"/> <property name="foo"/>
<property name="bar"/> <property name="bar"/>
</composite-element> </composite-element>
@ -202,7 +202,7 @@
<map name="stringGlarchMap" where="baz_map_index &gt; 'a' and tha_key is not null" cascade="all"> <map name="stringGlarchMap" where="baz_map_index &gt; 'a' and tha_key is not null" cascade="all">
<key column="baz_map_id"/> <key column="baz_map_id"/>
<index column="baz_map_index" type="string"/> <index column="baz_map_index" type="string"/>
<one-to-many class="org.hibernate.test.legacy.Glarch"/> <one-to-many class="org.hibernate.orm.test.legacy.Glarch"/>
</map> </map>
<map name="anyToAny" lazy="true"> <map name="anyToAny" lazy="true">
@ -228,27 +228,27 @@
<bag name="bazez" lazy="true" order-by="name_b desc" cascade="all"> <bag name="bazez" lazy="true" order-by="name_b desc" cascade="all">
<key column="`baz-id`"/> <key column="`baz-id`"/>
<one-to-many class="org.hibernate.test.legacy.Baz"/> <one-to-many class="org.hibernate.orm.test.legacy.Baz"/>
</bag> </bag>
<set name="sortablez" sort="natural" cascade="all"> <set name="sortablez" sort="natural" cascade="all">
<key column="baz"/> <key column="baz"/>
<one-to-many class="org.hibernate.test.legacy.Sortable"/> <one-to-many class="org.hibernate.orm.test.legacy.Sortable"/>
</set> </set>
<bag name="parts" lazy="true" cascade="save-update"> <bag name="parts" lazy="true" cascade="save-update">
<key column="baz"/> <key column="baz"/>
<one-to-many class="org.hibernate.test.legacy.Part"/> <one-to-many class="org.hibernate.orm.test.legacy.Part"/>
</bag> </bag>
<bag name="moreParts" lazy="true" cascade="save-update"> <bag name="moreParts" lazy="true" cascade="save-update">
<key column="baz"/> <key column="baz"/>
<many-to-many column="part" class="org.hibernate.test.legacy.Part"/> <many-to-many column="part" class="org.hibernate.orm.test.legacy.Part"/>
</bag> </bag>
<bag name="subs" inverse="true" cascade="all" access="field"> <bag name="subs" inverse="true" cascade="all" access="field">
<key column="superBaz" on-delete="cascade"/> <key column="superBaz" on-delete="cascade"/>
<one-to-many class="org.hibernate.test.legacy.Baz"/> <one-to-many class="org.hibernate.orm.test.legacy.Baz"/>
</bag> </bag>
<many-to-one name="superBaz" access="field"/> <many-to-one name="superBaz" access="field"/>
@ -258,7 +258,7 @@
<property name="str" column="`str`"/> <property name="str" column="`str`"/>
<bag name="foos" cascade="all"> <bag name="foos" cascade="all">
<key column="baz_compon_id"/> <key column="baz_compon_id"/>
<one-to-many class="org.hibernate.test.legacy.Foo"/> <one-to-many class="org.hibernate.orm.test.legacy.Foo"/>
</bag> </bag>
<bag name="floats" table="baz_floats_bag"> <bag name="floats" table="baz_floats_bag">
<key column="baz_compon_id"/> <key column="baz_compon_id"/>
@ -269,20 +269,20 @@
</class> </class>
<class name="org.hibernate.test.legacy.Sortable"> <class name="org.hibernate.orm.test.legacy.Sortable">
<id name="id"> <id name="id">
<generator class="native"/> <generator class="native"/>
</id> </id>
<property name="name"/> <property name="name"/>
</class> </class>
<class name="org.hibernate.test.legacy.Part" where="description like 'x%'"> <class name="org.hibernate.orm.test.legacy.Part" where="description like 'x%'">
<id name="id"> <id name="id">
<generator class="native"/> <generator class="native"/>
</id> </id>
<discriminator column="clazz"/> <discriminator column="clazz"/>
<property name="description"/> <property name="description"/>
<subclass name="org.hibernate.test.legacy.Part$SpecialPart"/> <subclass name="org.hibernate.orm.test.legacy.Part$SpecialPart"/>
</class> </class>

View File

@ -6,7 +6,8 @@
*/ */
//$Id: Baz.java 4688 2004-10-26 09:10:50Z oneovthafew $ //$Id: Baz.java 4688 2004-10-26 09:10:50Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;

View File

@ -9,7 +9,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN" "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Blobber" dynamic-update="true"> <class name="org.hibernate.orm.test.legacy.Blobber" dynamic-update="true">
<id name="id"> <id name="id">
<generator class="increment"/> <generator class="increment"/>
</id> </id>

View File

@ -4,7 +4,8 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.sql.Blob; import java.sql.Blob;
import java.sql.Clob; import java.sql.Clob;

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Broken" table="BROKE"> <class name="org.hibernate.orm.test.legacy.Broken" table="BROKE">
<!--id name="id" type="long" column="id_"> <!--id name="id" type="long" column="id_">
<generator class="increment"/> <generator class="increment"/>
</id--> </id-->
@ -19,7 +19,7 @@
<key-property name="otherId"/> <key-property name="otherId"/>
</composite-id> </composite-id>
<timestamp name="timestamp" column="`timestamp`"/> <timestamp name="timestamp" column="`timestamp`"/>
<joined-subclass name="org.hibernate.test.legacy.Fixed" table="FIX"> <joined-subclass name="org.hibernate.orm.test.legacy.Fixed" table="FIX">
<key> <key>
<column name="BROKE_ID"/> <column name="BROKE_ID"/>
<column name="OTHER_BROKE_ID"/> <column name="OTHER_BROKE_ID"/>
@ -29,7 +29,7 @@
<column name="FIX_ID"/> <column name="FIX_ID"/>
<column name="OTHER_FIX_ID"/> <column name="OTHER_FIX_ID"/>
</key> </key>
<one-to-many class="org.hibernate.test.legacy.Broken"/> <one-to-many class="org.hibernate.orm.test.legacy.Broken"/>
</set> </set>
<property name="list" type="serializable"/> <property name="list" type="serializable"/>
</joined-subclass> </joined-subclass>

View File

@ -6,7 +6,8 @@
*/ */
//$Id: Broken.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Broken.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;

View File

@ -6,7 +6,8 @@
*/ */
//$Id: C1.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: C1.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;

View File

@ -6,7 +6,8 @@
*/ */
//$Id: C2.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: C2.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Category" <class name="org.hibernate.orm.test.legacy.Category"
table="category" table="category"
dynamic-update="true" dynamic-update="true"
dynamic-insert="true"> dynamic-insert="true">
@ -23,7 +23,7 @@
<!--cache--> <!--cache-->
<key column="parent"/> <key column="parent"/>
<index column="ord"/> <index column="ord"/>
<one-to-many class="org.hibernate.test.legacy.Category"/> <one-to-many class="org.hibernate.orm.test.legacy.Category"/>
</list> </list>
<property name="name"/> <property name="name"/>
@ -31,25 +31,25 @@
</class> </class>
<class name="org.hibernate.test.legacy.Assignable" table="`assign-able`"> <class name="org.hibernate.orm.test.legacy.Assignable" table="`assign-able`">
<id name="id"> <id name="id">
<generator class="assigned"/> <generator class="assigned"/>
</id> </id>
<bag name="categories" inverse="true" cascade="all" lazy="true"> <bag name="categories" inverse="true" cascade="all" lazy="true">
<key column="`assign-able-id`"/> <key column="`assign-able-id`"/>
<one-to-many class="org.hibernate.test.legacy.Category"/> <one-to-many class="org.hibernate.orm.test.legacy.Category"/>
</bag> </bag>
</class> </class>
<sql-query name="namedsql"> <sql-query name="namedsql">
<return alias="category" class="org.hibernate.test.legacy.Category"/> <return alias="category" class="org.hibernate.orm.test.legacy.Category"/>
<return alias="assignable" class="org.hibernate.test.legacy.Assignable"/> <return alias="assignable" class="org.hibernate.orm.test.legacy.Assignable"/>
select {category.*}, {assignable.*} from category {category}, "assign-able" {assignable} select {category.*}, {assignable.*} from category {category}, "assign-able" {assignable}
</sql-query> </sql-query>
<sql-query name="nonaliasedsql"> <sql-query name="nonaliasedsql">
<return alias="category" class="org.hibernate.test.legacy.Category"> <return alias="category" class="org.hibernate.orm.test.legacy.Category">
<return-property name="id" column="category_key_col"/> <return-property name="id" column="category_key_col"/>
<return-property name="name" column="name"/> <return-property name="name" column="name"/>
<return-property name="assignable" column="assignid"/> <return-property name="assignable" column="assignid"/>

View File

@ -6,7 +6,8 @@
*/ */
//$Id: Category.java 5686 2005-02-12 07:27:32Z steveebersole $ //$Id: Category.java 5686 2005-02-12 07:27:32Z steveebersole $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Child.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Child.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
public class Child { public class Child {

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false" default-cascade="save-update"> <hibernate-mapping default-lazy="false" default-cascade="save-update">
<class name="org.hibernate.test.legacy.Circular" dynamic-update="true"> <class name="org.hibernate.orm.test.legacy.Circular" dynamic-update="true">
<id name="id" column="id_" length="64" unsaved-value="null"> <id name="id" column="id_" length="64" unsaved-value="null">
<generator class="uuid"/> <generator class="uuid"/>
</id> </id>

View File

@ -6,8 +6,7 @@
*/ */
//$Id: Circular.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Circular.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
public class Circular { public class Circular {

View File

@ -4,13 +4,13 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**
* @author hbm2java * @author hbm2java
*/ */
public class Company extends org.hibernate.test.legacy.Party { public class Company extends org.hibernate.orm.test.legacy.Party {
java.lang.String id; java.lang.String id;
java.lang.String president; java.lang.String president;

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Component.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Component.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**

View File

@ -6,7 +6,8 @@
*/ */
//$Id: ComponentCollection.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: ComponentCollection.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;

View File

@ -6,7 +6,7 @@
*/ */
//$Id: ComponentNotNull.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: ComponentNotNull.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**

View File

@ -11,7 +11,7 @@
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.ComponentNotNullRoot"> <!-- discriminator-value="A"> --> <class name="org.hibernate.orm.test.legacy.ComponentNotNullRoot"> <!-- discriminator-value="A"> -->
<id name="id" column="container_id"> <id name="id" column="container_id">
<generator class="native" /> <generator class="native" />
</id> </id>
@ -31,7 +31,7 @@
<list name="components" lazy="true" table="CompNotNullRoot_Comps"> <list name="components" lazy="true" table="CompNotNullRoot_Comps">
<key column = "container_id"/> <key column = "container_id"/>
<index column = "list_index"/> <index column = "list_index"/>
<composite-element class="org.hibernate.test.legacy.ComponentNotNullRoot$ContainerInnerClass"> <composite-element class="org.hibernate.orm.test.legacy.ComponentNotNullRoot$ContainerInnerClass">
<property name="name"/> <property name="name"/>
<property name="count" column="count_"/> <property name="count" column="count_"/>
<many-to-one name="simple" not-null="true" cascade="save-update"/> <many-to-one name="simple" not-null="true" cascade="save-update"/>
@ -43,12 +43,12 @@
<list name="componentsImplicit" lazy="true" table="CompNotNullRoot_CompsImpl"> <list name="componentsImplicit" lazy="true" table="CompNotNullRoot_CompsImpl">
<key column = "container_id"/> <key column = "container_id"/>
<index column = "list_index3"/> <index column = "list_index3"/>
<composite-element class="org.hibernate.test.legacy.ComponentNotNullRoot$ContainerInnerClass"> <composite-element class="org.hibernate.orm.test.legacy.ComponentNotNullRoot$ContainerInnerClass">
<property name="name"/> <property name="name"/>
<property name="count" column="count_"/> <property name="count" column="count_"/>
<many-to-one name="simple" cascade="save-update"/> <many-to-one name="simple" cascade="save-update"/>
<many-to-one name="one" cascade="save-update"/> <many-to-one name="one" cascade="save-update"/>
<nested-composite-element name="nested" class="org.hibernate.test.legacy.ComponentNotNullRoot$ContainerInnerClass"> <nested-composite-element name="nested" class="org.hibernate.orm.test.legacy.ComponentNotNullRoot$ContainerInnerClass">
<property name="nestedproperty" not-null="true"/> <property name="nestedproperty" not-null="true"/>
</nested-composite-element> </nested-composite-element>
</composite-element> </composite-element>

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.List; import java.util.List;

View File

@ -9,14 +9,14 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN" "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Componentizable"> <class name="org.hibernate.orm.test.legacy.Componentizable">
<id name="id"> <id name="id">
<generator class="native"/> <generator class="native"/>
</id> </id>
<property name="nickName"/> <property name="nickName"/>
<component name="component" access="property" class="org.hibernate.test.legacy.Component"> <component name="component" access="property" class="org.hibernate.orm.test.legacy.Component">
<property name="name"/> <property name="name"/>
<component name="subComponent" class="org.hibernate.test.legacy.SubComponent"> <component name="subComponent" class="org.hibernate.orm.test.legacy.SubComponent">
<property name="subName"/> <property name="subName"/>
<property name="subName1"/> <property name="subName1"/>
</component> </component>
@ -24,7 +24,7 @@
</class> </class>
<sql-query name="queryComponentWithOtherColumn"> <sql-query name="queryComponentWithOtherColumn">
<return class="org.hibernate.test.legacy.Componentizable"> <return class="org.hibernate.orm.test.legacy.Componentizable">
<return-property name="nickName" column="n2"/> <return-property name="nickName" column="n2"/>
<return-property name="component.subComponent.subName"> <return-property name="component.subComponent.subName">
<return-column name="otherSubName"/> <return-column name="otherSubName"/>

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Componentizable.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Componentizable.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**

View File

@ -6,7 +6,8 @@
*/ */
//$Id: CompositeElement.java 6844 2005-05-21 14:22:16Z oneovthafew $ //$Id: CompositeElement.java 6844 2005-05-21 14:22:16Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
public class CompositeElement implements Comparable, Serializable { public class CompositeElement implements Comparable, Serializable {

View File

@ -6,7 +6,7 @@
~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. ~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
--> -->
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="org.hibernate.test.legacy"> <hibernate-mapping package="org.hibernate.orm.test.legacy">
<class name="CompositeIdId"> <class name="CompositeIdId">
<composite-id> <composite-id>
<key-property name="user"/> <key-property name="user"/>

View File

@ -9,7 +9,8 @@
* Created on 20-Dec-2004 * Created on 20-Dec-2004
* *
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
/** /**

View File

@ -6,7 +6,8 @@
*/ */
//$Id: Contained.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Contained.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;

View File

@ -12,28 +12,28 @@
<hibernate-mapping default-lazy="false" auto-import="false"> <hibernate-mapping default-lazy="false" auto-import="false">
<import class="org.hibernate.test.legacy.Container" rename="ContainerX"/> <import class="org.hibernate.orm.test.legacy.Container" rename="ContainerX"/>
<import class="org.hibernate.test.legacy.Contained"/> <import class="org.hibernate.orm.test.legacy.Contained"/>
<import class="java.lang.Object" rename="Universe"/> <import class="java.lang.Object" rename="Universe"/>
<class name="org.hibernate.test.legacy.Container" proxy="org.hibernate.test.legacy.Container"> <class name="org.hibernate.orm.test.legacy.Container" proxy="org.hibernate.orm.test.legacy.Container">
<id name="id" column="container_id" unsaved-value="0"> <id name="id" column="container_id" unsaved-value="0">
<generator class="native" /> <generator class="native" />
</id> </id>
<list name="oneToMany" lazy="true"> <list name="oneToMany" lazy="true">
<key column = "container_id1"/> <key column = "container_id1"/>
<index column = "list_index"/> <index column = "list_index"/>
<one-to-many class="org.hibernate.test.legacy.Simple"/> <one-to-many class="org.hibernate.orm.test.legacy.Simple"/>
</list> </list>
<list name="manyToMany" lazy="true"> <list name="manyToMany" lazy="true">
<key column = "container_id2"/> <key column = "container_id2"/>
<index column = "list_index"/> <index column = "list_index"/>
<many-to-many class="org.hibernate.test.legacy.Simple"/> <many-to-many class="org.hibernate.orm.test.legacy.Simple"/>
</list> </list>
<list name="components" lazy="true"> <list name="components" lazy="true">
<key column = "container_id"/> <key column = "container_id"/>
<index column = "list_index"/> <index column = "list_index"/>
<composite-element class="org.hibernate.test.legacy.Container$ContainerInnerClass"> <composite-element class="org.hibernate.orm.test.legacy.Container$ContainerInnerClass">
<property name="name"/> <property name="name"/>
<property name="count" column="count_"/> <property name="count" column="count_"/>
<many-to-one name="simple"/> <many-to-one name="simple"/>
@ -43,7 +43,7 @@
</list> </list>
<set name="composites" lazy="true"> <set name="composites" lazy="true">
<key column = "container_id"/> <key column = "container_id"/>
<composite-element class="org.hibernate.test.legacy.Container$ContainerInnerClass"> <composite-element class="org.hibernate.orm.test.legacy.Container$ContainerInnerClass">
<property name="name"/> <property name="name"/>
<many-to-one name="simple"/> <many-to-one name="simple"/>
<many-to-one name="one"/> <many-to-one name="one"/>
@ -52,7 +52,7 @@
</set> </set>
<bag name="cascades" cascade="all" table="abcd"> <bag name="cascades" cascade="all" table="abcd">
<key column="container_id"/> <key column="container_id"/>
<composite-element class="org.hibernate.test.legacy.Container$ContainerInnerClass"> <composite-element class="org.hibernate.orm.test.legacy.Container$ContainerInnerClass">
<property name="name"/> <property name="name"/>
<many-to-one name="simple" cascade="all"/> <many-to-one name="simple" cascade="all"/>
<many-to-one name="one" cascade="all" not-null="true"/> <many-to-one name="one" cascade="all" not-null="true"/>
@ -61,17 +61,17 @@
</bag> </bag>
<bag name="bag" inverse="true" cascade="save-update" table="CCBAG"> <bag name="bag" inverse="true" cascade="save-update" table="CCBAG">
<key column="container_id"/> <key column="container_id"/>
<many-to-many column="contained_id" class="org.hibernate.test.legacy.Contained" outer-join="true"/> <many-to-many column="contained_id" class="org.hibernate.orm.test.legacy.Contained" outer-join="true"/>
</bag> </bag>
<bag name="lazyBag" inverse="true" lazy="true" table="LCCBAG" cascade="save-update"> <bag name="lazyBag" inverse="true" lazy="true" table="LCCBAG" cascade="save-update">
<!--cache usage="read-write"--> <!--cache usage="read-write"-->
<key column="container_id"/> <key column="container_id"/>
<many-to-many column="contained_id" class="org.hibernate.test.legacy.Contained"/> <many-to-many column="contained_id" class="org.hibernate.orm.test.legacy.Contained"/>
</bag> </bag>
<map name="ternaryMap"> <map name="ternaryMap">
<key column="container_id"/> <key column="container_id"/>
<index column="idx" type="string" length="32"/> <index column="idx" type="string" length="32"/>
<composite-element class="org.hibernate.test.legacy.Container$Ternary"> <composite-element class="org.hibernate.orm.test.legacy.Container$Ternary">
<property name="name"/> <property name="name"/>
<many-to-one name="foo"/> <many-to-one name="foo"/>
<many-to-one name="glarch"/> <many-to-one name="glarch"/>
@ -79,7 +79,7 @@
</map> </map>
<set name="ternarySet"> <set name="ternarySet">
<key column="container_id"/> <key column="container_id"/>
<composite-element class="org.hibernate.test.legacy.Container$Ternary"> <composite-element class="org.hibernate.orm.test.legacy.Container$Ternary">
<property name="name" not-null="true"/> <property name="name" not-null="true"/>
<many-to-one name="foo" not-null="true"/> <many-to-one name="foo" not-null="true"/>
<many-to-one name="glarch" not-null="true"/> <many-to-one name="glarch" not-null="true"/>
@ -87,17 +87,17 @@
</set> </set>
</class> </class>
<class name="org.hibernate.test.legacy.Contained" proxy="org.hibernate.test.legacy.Contained"> <class name="org.hibernate.orm.test.legacy.Contained" proxy="org.hibernate.orm.test.legacy.Contained">
<id name="id" column="container_id" unsaved-value="0"> <id name="id" column="container_id" unsaved-value="0">
<generator class="native" /> <generator class="native" />
</id> </id>
<bag name="bag" table="CCBAG"> <bag name="bag" table="CCBAG">
<key column="contained_id"/> <key column="contained_id"/>
<many-to-many column="container_id" class="org.hibernate.test.legacy.Container" outer-join="false"/> <many-to-many column="container_id" class="org.hibernate.orm.test.legacy.Container" outer-join="false"/>
</bag> </bag>
<bag name="lazyBag" lazy="true" table="LCCBAG"> <bag name="lazyBag" lazy="true" table="LCCBAG">
<key column="contained_id"/> <key column="contained_id"/>
<many-to-many column="container_id" class="org.hibernate.test.legacy.Container"/> <many-to-many column="container_id" class="org.hibernate.orm.test.legacy.Container"/>
</bag> </bag>
</class> </class>

View File

@ -6,7 +6,8 @@
*/ */
//$Id: Container.java 6844 2005-05-21 14:22:16Z oneovthafew $ //$Id: Container.java 6844 2005-05-21 14:22:16Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Custom" persister="org.hibernate.test.legacy.CustomPersister"> <class name="org.hibernate.orm.test.legacy.Custom" persister="org.hibernate.orm.test.legacy.CustomPersister">
<id type="string" name="id" column="id_" length="64" unsaved-value="null" access="field"> <id type="string" name="id" column="id_" length="64" unsaved-value="null" access="field">
<generator class="uuid.hex"/> <generator class="uuid.hex"/>
</id> </id>

View File

@ -6,9 +6,7 @@
*/ */
//$Id: Custom.java 7275 2005-06-22 18:58:16Z oneovthafew $ //$Id: Custom.java 7275 2005-06-22 18:58:16Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
public class Custom implements Cloneable { public class Custom implements Cloneable {
String id; String id;

View File

@ -4,10 +4,9 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.Hashtable; import java.util.Hashtable;

View File

@ -8,7 +8,7 @@
<!DOCTYPE hibernate-mapping PUBLIC <!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN" "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false" package="org.hibernate.test.legacy"> <hibernate-mapping default-lazy="false" package="org.hibernate.orm.test.legacy">
<class name="Role" table="`Role`"> <class name="Role" table="`Role`">
<id name="id" type="long"> <id name="id" type="long">
@ -99,7 +99,7 @@
<joined-subclass name="Medication"> <joined-subclass name="Medication">
<key column="interventionid"/> <key column="interventionid"/>
<many-to-one name="prescribedDrug" class="org.hibernate.test.legacy.Drug"/> <many-to-one name="prescribedDrug" class="org.hibernate.orm.test.legacy.Drug"/>
<sql-insert>insert into /** put weird comments here */ Medication (prescribedDrug, interventionid) values (?, ?)</sql-insert> <sql-insert>insert into /** put weird comments here */ Medication (prescribedDrug, interventionid) values (?, ?)</sql-insert>
</joined-subclass> </joined-subclass>

View File

@ -6,7 +6,7 @@
*/ */
//$Id: D.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: D.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
public class D { public class D {

View File

@ -6,7 +6,8 @@
*/ */
//$Id: Detail.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Detail.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;

View File

@ -6,9 +6,7 @@
*/ */
//$Id: Down.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Down.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**
* @author Gavin King * @author Gavin King

View File

@ -4,13 +4,12 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**
* @author hbm2java * @author hbm2java
*/ */
public class Drug extends org.hibernate.test.legacy.Resource { public class Drug extends org.hibernate.orm.test.legacy.Resource {
java.lang.String id; java.lang.String id;

View File

@ -6,7 +6,8 @@
*/ */
//$Id: E.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: E.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.Set; import java.util.Set;
public class E { public class E {

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false" <hibernate-mapping default-lazy="false"
default-cascade="save-update" default-cascade="save-update"
package="org.hibernate.test.legacy"> package="org.hibernate.orm.test.legacy">
<class name="Eye" lazy="true"> <class name="Eye" lazy="true">
<id name="id" unsaved-value="0"> <id name="id" unsaved-value="0">

View File

@ -6,7 +6,8 @@
*/ */
//$Id: Eye.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Eye.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Fee" table="`the fees`"> <class name="org.hibernate.orm.test.legacy.Fee" table="`the fees`">
<id type="string" name="key" column="id_" length="64" unsaved-value="null"> <id type="string" name="key" column="id_" length="64" unsaved-value="null">
<generator class="uuid"/> <generator class="uuid"/>
</id> </id>

View File

@ -6,7 +6,8 @@
*/ */
//$Id: Fee.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Fee.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
import java.util.Set; import java.util.Set;

View File

@ -6,7 +6,8 @@
*/ */
//$Id: Fixed.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Fixed.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;

View File

@ -10,8 +10,8 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Fo" table="foes"> <class name="org.hibernate.orm.test.legacy.Fo" table="foes">
<composite-id name="id" class="org.hibernate.test.legacy.FumCompositeID"> <composite-id name="id" class="org.hibernate.orm.test.legacy.FumCompositeID">
<key-property name="string"> <key-property name="string">
<column name="string_" length="20"/> <column name="string_" length="20"/>
</key-property> </key-property>

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Fo.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Fo.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
public final class Fo { public final class Fo {

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Foo.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Foo.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Calendar; import java.util.Calendar;

View File

@ -8,7 +8,7 @@
<!DOCTYPE hibernate-mapping PUBLIC <!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN" "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false" package="org.hibernate.test.legacy"> <hibernate-mapping default-lazy="false" package="org.hibernate.orm.test.legacy">
<import class="Result"/> <import class="Result"/>
<import class="Named"/> <import class="Named"/>
@ -70,7 +70,7 @@
</property> </property>
<property name="byte" column="byte_"/> <property name="byte" column="byte_"/>
<property name="yesno" type="yes_no"/> <property name="yesno" type="yes_no"/>
<property name="blob" type="org.hibernate.test.legacy.Foo$Struct" column="blobb_"/> <property name="blob" type="org.hibernate.orm.test.legacy.Foo$Struct" column="blobb_"/>
<property name="nullBlob" type="serializable"/> <property name="nullBlob" type="serializable"/>
<property name="binary" column="bin_"/> <property name="binary" column="bin_"/>
<property name="theLocale" access="field" column="`localeayzabc123`"/> <property name="theLocale" access="field" column="`localeayzabc123`"/>
@ -85,7 +85,7 @@
<many-to-one name="glarch" <many-to-one name="glarch"
column="g__" column="g__"
cascade="all" cascade="all"
class="org.hibernate.test.legacy.Glarch" class="org.hibernate.orm.test.legacy.Glarch"
lazy="proxy" lazy="proxy"
outer-join="true"/> outer-join="true"/>
<property name="null" column="cmpnt_null_"/> <property name="null" column="cmpnt_null_"/>
@ -122,7 +122,7 @@
<join table="foo_dep_table"> <join table="foo_dep_table">
<key column="fooid"/> <key column="fooid"/>
<many-to-one name="dependent" <many-to-one name="dependent"
class="org.hibernate.test.legacy.Fee" class="org.hibernate.orm.test.legacy.Fee"
cascade="all" cascade="all"
not-null="true"/> not-null="true"/>
</join> </join>

View File

@ -6,7 +6,7 @@
*/ */
//$Id: FooComponent.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: FooComponent.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
public interface FooProxy { public interface FooProxy {

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Fum" dynamic-update="true"> <class name="org.hibernate.orm.test.legacy.Fum" dynamic-update="true">
<!--cache--> <!--cache-->
<composite-id name="id" unsaved-value="any"> <composite-id name="id" unsaved-value="any">
<meta attribute="fum">fum</meta> <meta attribute="fum">fum</meta>
@ -32,7 +32,7 @@
<column name="fr_string_" length="10"/> <column name="fr_string_" length="10"/>
<column name="fr_short_"/> <column name="fr_short_"/>
</key> </key>
<one-to-many class="org.hibernate.test.legacy.Fum"/> <one-to-many class="org.hibernate.orm.test.legacy.Fum"/>
</set> </set>
<array name="quxArray"> <array name="quxArray">
<key> <key>
@ -40,7 +40,7 @@
<column name="fum_sho_"/> <column name="fum_sho_"/>
</key> </key>
<index column="i"/> <index column="i"/>
<one-to-many class="org.hibernate.test.legacy.Qux"/> <one-to-many class="org.hibernate.orm.test.legacy.Qux"/>
</array> </array>
<property name="dupe" <property name="dupe"
column="short_" column="short_"
@ -55,7 +55,7 @@
<column name="fum_sho_"/> <column name="fum_sho_"/>
</key> </key>
<index column="fummapindex" type="string"/> <index column="fummapindex" type="string"/>
<one-to-many class="org.hibernate.test.legacy.Fum"/> <one-to-many class="org.hibernate.orm.test.legacy.Fum"/>
</map> </map>
<map name="stringmap" outer-join="true"> <map name="stringmap" outer-join="true">
<key> <key>

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Fum.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Fum.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.Calendar; import java.util.Calendar;

View File

@ -6,7 +6,7 @@
*/ */
//$Id: FumCompositeID.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: FumCompositeID.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Fumm"> <class name="org.hibernate.orm.test.legacy.Fumm">
<composite-id name="id"> <composite-id name="id">
<key-property name="string"> <key-property name="string">
<column name="string_" length="10"/> <column name="string_" length="10"/>

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Fumm.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Fumm.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.Locale; import java.util.Locale;
public class Fumm { public class Fumm {

View File

@ -8,7 +8,7 @@
<!DOCTYPE hibernate-mapping PUBLIC <!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN" "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false" package="org.hibernate.test.legacy"> <hibernate-mapping default-lazy="false" package="org.hibernate.orm.test.legacy">
<class name="Glarch" <class name="Glarch"
table="`glarchez`" table="`glarchez`"
@ -50,7 +50,7 @@
<array name="proxyArray" element-class="GlarchProxy"> <array name="proxyArray" element-class="GlarchProxy">
<key column="array_key"/> <key column="array_key"/>
<index column="array_indecks"/> <index column="array_indecks"/>
<one-to-many class="org.hibernate.test.legacy.Glarch"/> <one-to-many class="org.hibernate.orm.test.legacy.Glarch"/>
</array> </array>
<set name="proxySet"> <set name="proxySet">
<key column="set_key"/> <key column="set_key"/>

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Glarch.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Glarch.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;

View File

@ -9,7 +9,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN" "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Holder"> <class name="org.hibernate.orm.test.legacy.Holder">
<id name="id" column="id_" type="string" length="32" unsaved-value="null"> <id name="id" column="id_" type="string" length="32" unsaved-value="null">
<generator class="uuid.hex"/> <generator class="uuid.hex"/>
</id> </id>
@ -17,16 +17,16 @@
<list name="ones"> <list name="ones">
<key column="holder"/> <key column="holder"/>
<index column="i"/> <index column="i"/>
<one-to-many class="org.hibernate.test.legacy.One"/> <one-to-many class="org.hibernate.orm.test.legacy.One"/>
</list> </list>
<array name="fooArray"> <array name="fooArray">
<key column="holder1"/> <key column="holder1"/>
<index column="j1"/> <index column="j1"/>
<one-to-many class="org.hibernate.test.legacy.Foo"/> <one-to-many class="org.hibernate.orm.test.legacy.Foo"/>
</array> </array>
<set name="foos"> <set name="foos">
<key column="holder2"/> <key column="holder2"/>
<one-to-many class="org.hibernate.test.legacy.Foo"/> <one-to-many class="org.hibernate.orm.test.legacy.Foo"/>
</set> </set>
<many-to-one name="otherHolder" property-ref="name" cascade="all"/> <many-to-one name="otherHolder" property-ref="name" cascade="all"/>
</class> </class>

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Holder.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Holder.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;

View File

@ -6,7 +6,7 @@
*/ */
//$Id: I.java 7203 2005-06-19 02:01:05Z oneovthafew $ //$Id: I.java 7203 2005-06-19 02:01:05Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**

View File

@ -9,7 +9,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN" "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false" <hibernate-mapping default-lazy="false"
package="org.hibernate.test.legacy" package="org.hibernate.orm.test.legacy"
default-access="field"> default-access="field">
<class name="I" discriminator-value="0"> <class name="I" discriminator-value="0">

View File

@ -9,7 +9,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN" "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false" <hibernate-mapping default-lazy="false"
package="org.hibernate.test.legacy" package="org.hibernate.orm.test.legacy"
default-access="field"> default-access="field">
<class name="I"> <class name="I">

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Immutable" table="immut" mutable="false"> <class name="org.hibernate.orm.test.legacy.Immutable" table="immut" mutable="false">
<!--cache--> <!--cache-->
<id name="id" column="id_" length="64"> <id name="id" column="id_" length="64">
<generator class="uuid"/> <generator class="uuid"/>

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Immutable.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Immutable.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
public class Immutable { public class Immutable {

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
/** /**

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**

View File

@ -6,7 +6,7 @@
*/ */
//$Id: J.java 7203 2005-06-19 02:01:05Z oneovthafew $ //$Id: J.java 7203 2005-06-19 02:01:05Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Jay.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Jay.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**

View File

@ -6,7 +6,7 @@
*/ */
//$Id: K.java 7203 2005-06-19 02:01:05Z oneovthafew $ //$Id: K.java 7203 2005-06-19 02:01:05Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.Set; import java.util.Set;
/** /**

View File

@ -10,7 +10,7 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Location"> <class name="org.hibernate.orm.test.legacy.Location">
<composite-id> <composite-id>
<key-property name="streetNumber"/> <key-property name="streetNumber"/>
<key-property name="streetName" length="20"/> <key-property name="streetName" length="20"/>

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Location.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Location.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
import java.util.Locale; import java.util.Locale;

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Lower.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Lower.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;

View File

@ -12,7 +12,7 @@
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class <class
name="org.hibernate.test.legacy.MainObject" name="org.hibernate.orm.test.legacy.MainObject"
table="mainobject" table="mainobject"
dynamic-update="false" dynamic-update="false"
dynamic-insert="false" dynamic-insert="false"
@ -31,7 +31,7 @@
<one-to-one <one-to-one
name="obj2" name="obj2"
class="org.hibernate.test.legacy.Object2" class="org.hibernate.orm.test.legacy.Object2"
cascade="all" cascade="all"
outer-join="auto" outer-join="auto"
constrained="false" constrained="false"

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**

View File

@ -11,12 +11,12 @@
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Many" table="many"> <class name="org.hibernate.orm.test.legacy.Many" table="many">
<id name="key" column="many_key"> <id name="key" column="many_key">
<generator class="native" /> <generator class="native" />
</id> </id>
<property name="x"/> <property name="x"/>
<many-to-one name="one" column="one_key" class="org.hibernate.test.legacy.One"/> <many-to-one name="one" column="one_key" class="org.hibernate.orm.test.legacy.One"/>
</class> </class>
</hibernate-mapping> </hibernate-mapping>

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Many.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Many.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
public class Many { public class Many {

View File

@ -4,22 +4,22 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
/** /**
* @author hbm2java * @author hbm2java
*/ */
public class Medication extends org.hibernate.test.legacy.Intervention { public class Medication extends org.hibernate.orm.test.legacy.Intervention {
org.hibernate.test.legacy.Drug prescribedDrug; org.hibernate.orm.test.legacy.Drug prescribedDrug;
org.hibernate.test.legacy.Drug getPrescribedDrug() { org.hibernate.orm.test.legacy.Drug getPrescribedDrug() {
return prescribedDrug; return prescribedDrug;
} }
void setPrescribedDrug(org.hibernate.test.legacy.Drug newValue) { void setPrescribedDrug(org.hibernate.orm.test.legacy.Drug newValue) {
prescribedDrug = newValue; prescribedDrug = newValue;
} }

View File

@ -11,7 +11,7 @@
<hibernate-mapping default-lazy="false"> <hibernate-mapping default-lazy="false">
<class name="org.hibernate.test.legacy.Inner" table="CID_IN"> <class name="org.hibernate.orm.test.legacy.Inner" table="CID_IN">
<composite-id name="id"> <composite-id name="id">
<key-property name="akey" type="string" length="10" column="AKEY"/> <key-property name="akey" type="string" length="10" column="AKEY"/>
<key-property name="bkey" type="string" length="10" column="BKEY"/> <key-property name="bkey" type="string" length="10" column="BKEY"/>
@ -22,7 +22,7 @@
<column length="10" name="AKEY"/> <column length="10" name="AKEY"/>
<column length="10" name="BKEY"/> <column length="10" name="BKEY"/>
</key> </key>
<one-to-many class="org.hibernate.test.legacy.Middle"/> <one-to-many class="org.hibernate.orm.test.legacy.Middle"/>
</bag> </bag>
<many-to-one name="backOut"> <many-to-one name="backOut">
<column name="BO_AKEY"/> <column name="BO_AKEY"/>
@ -33,7 +33,7 @@
</many-to-one> </many-to-one>
</class> </class>
<class name="org.hibernate.test.legacy.Middle" table="CID_MID"> <class name="org.hibernate.orm.test.legacy.Middle" table="CID_MID">
<composite-id name="id"> <composite-id name="id">
<key-many-to-one name="sup"> <key-many-to-one name="sup">
<column length="10" name="AKEY"/> <column length="10" name="AKEY"/>
@ -45,7 +45,7 @@
<property column="BLA" length="10" name="bla" not-null="true" type="string"/> <property column="BLA" length="10" name="bla" not-null="true" type="string"/>
</class> </class>
<class name="org.hibernate.test.legacy.Outer" table="CID_OUT"> <class name="org.hibernate.orm.test.legacy.Outer" table="CID_OUT">
<composite-id name="id"> <composite-id name="id">
<key-many-to-one name="root"> <key-many-to-one name="root">
<column length="10" name="AKEY"/> <column length="10" name="AKEY"/>

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
/** /**

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.io.Serializable; import java.io.Serializable;
/** /**

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Mono.java 4599 2004-09-26 05:18:27Z oneovthafew $ //$Id: Mono.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy; package org.hibernate.orm.test.legacy;
import java.util.Set; import java.util.Set;

Some files were not shown because too many files have changed in this diff Show More