From hibernate-commits at lists.jboss.org Tue Nov 21 12:38:50 2006 Content-Type: multipart/mixed; boundary="===============2411277410566165087==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r10851 - in branches/Branch_3_2/Hibernate3: doc/reference/en/modules src/org/hibernate/hql/ast/tree src/org/hibernate/persister/entity src/org/hibernate/tuple/entity test/org/hibernate/test test/org/hibernate/test/idprops test/org/hibernate/test/legacy Date: Tue, 21 Nov 2006 12:38:50 -0500 Message-ID: --===============2411277410566165087== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2006-11-21 12:38:43 -0500 (Tue, 21 Nov 2006) New Revision: 10851 Added: branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/ branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/Identifie= rPropertyReferencesTest.java branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/LineItem.= java branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/LineItemP= K.java branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/Mapping.h= bm.xml branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/Order.java branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/Person.ja= va Modified: branches/Branch_3_2/Hibernate3/doc/reference/en/modules/query_hql.xml branches/Branch_3_2/Hibernate3/src/org/hibernate/hql/ast/tree/DotNode.ja= va branches/Branch_3_2/Hibernate3/src/org/hibernate/hql/ast/tree/FromElemen= t.java branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity/Abstra= ctEntityPersister.java branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity/Abstra= ctPropertyMapping.java branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity/Entity= Persister.java branches/Branch_3_2/Hibernate3/src/org/hibernate/tuple/entity/EntityMeta= model.java branches/Branch_3_2/Hibernate3/test/org/hibernate/test/legacy/CustomPers= ister.java Log: HHH-1851 : relax special 'id' property handling Modified: branches/Branch_3_2/Hibernate3/doc/reference/en/modules/query_hql= .xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/Branch_3_2/Hibernate3/doc/reference/en/modules/query_hql.xml 2= 006-11-21 16:33:52 UTC (rev 10850) +++ branches/Branch_3_2/Hibernate3/doc/reference/en/modules/query_hql.xml 2= 006-11-21 17:38:43 UTC (rev 10851) @@ -1,4 +1,4 @@ - + HQL: The Hibernate Query Language = @@ -210,6 +210,42 @@ = + + Refering to identifier property + + + There are, generally speaking, 2 ways to refer to an entity's = identifier property: + + + + + The special property (lowercase) id= may be used to reference the identifier + property of an entity provided that entity d= oes not define a non-identifier property + named id. + + + + + If the entity defines a named identifier property, you= may use that property name. + + + + + + References to composite identifier properties follow the same = naming rules. If the + entity has a non-identifier property named id, the composite i= dentifier property can only + be referenced by its defined named; otherwise, the special id property + can be used to rerference the identifier property. + + + + Note: this has changed significantly starting in version 3.2.2= . In previous versions, + id always referred to = the identifier property no + matter what its actual name. A ramification of that decision = was that non-identifier + properties named id could never be referenc= ed in Hibernate queries. + + + The select clause = @@ -389,7 +425,7 @@ = = - + The where clause = @@ -448,8 +484,9 @@ where cat.mate =3D mate]]> = - The special property (lowercase) id may be = used to reference the = - unique identifier of an object. (You may also use its property= name.) + The special property (lowercase) id may be = used to reference the + unique identifier of an object. See + for more information. = Properties of composite identifiers may also be used. Suppose = Person = has a composite identifier consisting of country and = - medicareNumber. + medicareNumber. Again, see + for more information regarding referencing identifier properti= es. = Once again, the second query requires no table join. - = + Likewise, the special property class access= es the discriminator value of an instance in the case of polymorphic persistence. A Java = class name embedded in the = @@ -485,17 +523,12 @@ = - = + - You may also specify properties of components or composite use= r types (and of components = - of components, etc). Never try to use a path-expression that e= nds in a property of component = - type (as opposed to a property of a component). For example, i= f store.owner - is an entity with a component address + You may also use components or composite user types, or proper= ties of said + component types. See = for more details. = - - An "any" type has the special properties id= and class, allowing us to express a join in the following way (where AuditLog.item @@ -869,7 +902,7 @@ = = - + Subqueries = @@ -906,33 +939,10 @@ = - For subqueries with more than one expression in the select lis= t, you can use a tuple constructor: + Note that subqueries can also utilize row value const= ructor syntax. See + for more details. = - - - - Note that on some databases (but not Oracle or HSQL), you can = use tuple constructors in other - contexts, for example when querying components or composite us= er types: - - - - = - - Which is equivalent to the more verbose: - - = - - - - There are two good reasons you might not want to do this kind = of thing: first, it is not = - completely portable between database platforms; second, the qu= ery is now dependent upon - the ordering of properties in the mapping document. - - = = @@ -1147,5 +1157,78 @@ = = + + Components + + + Components might be used in just about every way that simple v= alue types can be used in HQL + queries. They can appear in the select cla= use: + + + + = + + + where the Person's name property is a component. Components c= an also be used + in the where clause: + + + + + + + Components can also be used in the order by= clause: + + + + + + + Another common use of components is in row value constructors. + + + + + Row value constructor syntax + + + HQL supports the use of ANSI SQL row value constructo= r syntax (sometimes + called tuple syntax), even though the under= lying database may not support + that notion. Here we are generally referring to multi-valued = comparisons, typically associated + with components. Consider an entity Person which defines a na= me component: + + + + + + That's valid syntax, although a little verbose. It be nice to= make this a bit more concise and use + row value constructor syntax: + + + + + + It can also be useful to specify this in the select clause: + + + + + + Another time using row value constructor sy= ntax can be beneficial + is when using subqueries needing to compare against multiple v= alues: + + + + + + One thing to consider when deciding if you want to use this sy= ntax is that the query will + be dependent upon the ordering of the component sub-properties= in the metadata. + + + + = Modified: branches/Branch_3_2/Hibernate3/src/org/hibernate/hql/ast/tree/Dot= Node.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/Branch_3_2/Hibernate3/src/org/hibernate/hql/ast/tree/DotNode.j= ava 2006-11-21 16:33:52 UTC (rev 10850) +++ branches/Branch_3_2/Hibernate3/src/org/hibernate/hql/ast/tree/DotNode.j= ava 2006-11-21 17:38:43 UTC (rev 10851) @@ -81,9 +81,9 @@ private FromElement impliedJoin; = /** - * Sets the join type for the '.' node (JoinFragment.XXX). + * Sets the join type for this '.' node structure. * - * @param joinType + * @param joinType The type of join to use. * @see JoinFragment */ public void setJoinType(int joinType) { @@ -220,8 +220,7 @@ private Type prepareLhs() throws SemanticException { FromReferenceNode lhs =3D getLhs(); lhs.prepareForDot( propertyName ); - Type propertyType =3D getDataType(); - return propertyType; + return getDataType(); } = private void dereferenceCollection(CollectionType collectionType, boolean= implicitJoin, boolean indexed, String classAlias, AST parent) @@ -298,7 +297,7 @@ // select clause is part of a scalar query :/ ) DotNode parentAsDotNode =3D null; String property =3D propertyName; - boolean joinIsNeeded =3D false; + final boolean joinIsNeeded; = if ( isDotNode( parent ) ) { parentAsDotNode =3D ( DotNode ) parent; @@ -340,13 +339,11 @@ String joinPath =3D getPath(); = if ( impliedJoin && getWalker().isInFrom() ) { - int impliedJoinType =3D getWalker().getImpliedJoinType(); - joinType =3D impliedJoinType; + joinType =3D getWalker().getImpliedJoinType(); } = FromClause currentFromClause =3D getWalker().getCurrentFromClause(); - FromElement elem =3D null; - elem =3D currentFromClause.findJoinByPath( joinPath ); + FromElement elem =3D currentFromClause.findJoinByPath( joinPath ); = //////////////////////////////////////////////////////////////////////////= ///// // @@ -420,14 +417,42 @@ return impliedJoin; } = - private boolean isReferenceToPrimaryKey(String propertyName, EntityType p= ropertyType) { - if ( EntityPersister.ENTITY_ID.equals( propertyName ) ) { - // the referenced node text is the special 'id' - return propertyType.isReferenceToPrimaryKey(); + /** + * Is the given property name a reference to the primary key of the assoc= iated + * entity construed by the given entity type? + *

+ * For example, consider a fragment like order.customer.id + * (where order is a from-element alias). Here, we'd have: + * propertyName =3D "id" AND + * owningType =3D ManyToOneType(Customer) + * and are being asked to determine whether "customer.id" is a reference + * to customer's PK... + * + * @param propertyName The name of the property to check. + * @param owningType The type represeting the entity "owning" the property + * @return True if propertyName references the entity's (owningType->asso= ciatedEntity) + * primary key; false otherwise. + */ + private boolean isReferenceToPrimaryKey(String propertyName, EntityType o= wningType) { + EntityPersister persister =3D getSessionFactoryHelper() + .getFactory() + .getEntityPersister( owningType.getAssociatedEntityName() ); + if ( persister.getEntityMetamodel().hasNonIdentifierPropertyNamedId() ) { + // only the identifier property field name can be a reference to the as= sociated entity's PK... + return propertyName.equals( persister.getIdentifierPropertyName() ) && = owningType.isReferenceToPrimaryKey(); } else { - String keyPropertyName =3D getSessionFactoryHelper().getIdentifierOrUni= queKeyPropertyName( propertyType ); - return keyPropertyName !=3D null && keyPropertyName.equals( propertyNam= e ) && propertyType.isReferenceToPrimaryKey(); + // here, we have two possibilities: + // 1) the property-name matches the explicitly identifier property na= me + // 2) the property-name matches the implicit 'id' property name + if ( EntityPersister.ENTITY_ID.equals( propertyName ) ) { + // the referenced node text is the special 'id' + return owningType.isReferenceToPrimaryKey(); + } + else { + String keyPropertyName =3D getSessionFactoryHelper().getIdentifierOrUn= iqueKeyPropertyName( owningType ); + return keyPropertyName !=3D null && keyPropertyName.equals( propertyNa= me ) && owningType.isReferenceToPrimaryKey(); + } } } = Modified: branches/Branch_3_2/Hibernate3/src/org/hibernate/hql/ast/tree/Fro= mElement.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/Branch_3_2/Hibernate3/src/org/hibernate/hql/ast/tree/FromEleme= nt.java 2006-11-21 16:33:52 UTC (rev 10850) +++ branches/Branch_3_2/Hibernate3/src/org/hibernate/hql/ast/tree/FromEleme= nt.java 2006-11-21 17:38:43 UTC (rev 10851) @@ -5,7 +5,6 @@ import java.util.List; = import org.hibernate.QueryException; -import org.hibernate.MappingException; import org.hibernate.engine.JoinSequence; import org.hibernate.hql.QueryTranslator; import org.hibernate.hql.CollectionProperties; @@ -285,11 +284,19 @@ throw new IllegalStateException( "No table alias for node " + this ); } String[] cols; + String propertyName; + if ( getEntityPersister() !=3D null && getEntityPersister().getEntityMet= amodel() !=3D null + && getEntityPersister().getEntityMetamodel().hasNonIdentifierPropertyN= amedId() ) { + propertyName =3D getEntityPersister().getIdentifierPropertyName(); + } + else { + propertyName =3D EntityPersister.ENTITY_ID; + } if ( getWalker().getStatementType() =3D=3D HqlSqlWalker.SELECT ) { - cols =3D getPropertyMapping( EntityPersister.ENTITY_ID ).toColumns( tab= le, EntityPersister.ENTITY_ID ); + cols =3D getPropertyMapping( propertyName ).toColumns( table, propertyN= ame ); } else { - cols =3D getPropertyMapping( EntityPersister.ENTITY_ID ).toColumns( Ent= ityPersister.ENTITY_ID ); + cols =3D getPropertyMapping( propertyName ).toColumns( propertyName ); } String result =3D StringHelper.join( ", ", cols ); return cols.length =3D=3D 1 ? result : "(" + result + ")"; @@ -375,13 +382,6 @@ return origin; } = - /** - * Returns the type of a property, given it's name (the last part) and th= e full path. - * - * @param propertyName The last part of the full path to the property. - * @return The type. - * @0param propertyPath The full property path. - */ public Type getPropertyType(String propertyName, String propertyPath) { return elementType.getPropertyType( propertyName, propertyPath ); } @@ -422,9 +422,6 @@ return filter; } = - /** - * Returns true if the from fragment should be included in the from claus= e. - */ public boolean useFromFragment() { checkInitialized(); // If it's not implied or it is implied and it's a many to many join whe= re the target wasn't found. @@ -472,10 +469,6 @@ // Do nothing, eplicit from elements are *always* in the projection list. } = - /** - * Returns true if this element should be in the projection list. - * - */ public boolean inProjectionList() { return !isImplied() && isFromOrJoinFragment(); } Modified: branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity= /AbstractEntityPersister.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity/Abstr= actEntityPersister.java 2006-11-21 16:33:52 UTC (rev 10850) +++ branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity/Abstr= actEntityPersister.java 2006-11-21 17:38:43 UTC (rev 10851) @@ -1508,9 +1508,11 @@ // ALIASES internalInitSubclassPropertyAliasesMap( null, model.getSubclassPropertyC= losureIterator() ); = - // aliases for identifier ( alias.id ) - subclassPropertyAliases.put( ENTITY_ID, getIdentifierAliases() ); - subclassPropertyColumnNames.put( ENTITY_ID, getIdentifierColumnNames() ); + // aliases for identifier ( alias.id ); skip if the entity defines a non= -id property named 'id' + if ( ! entityMetamodel.hasNonIdentifierPropertyNamedId() ) { + subclassPropertyAliases.put( ENTITY_ID, getIdentifierAliases() ); + subclassPropertyColumnNames.put( ENTITY_ID, getIdentifierColumnNames() = ); + } = // aliases named identifier ( alias.idname ) if ( hasIdentifierProperty() ) { @@ -1527,23 +1529,26 @@ String[] idColumnNames =3D getIdentifierColumnNames(); = for ( int i =3D 0; i < idPropertyNames.length; i++ ) { - subclassPropertyAliases.put( - ENTITY_ID + "." + idPropertyNames[i], - new String[] { idAliases[i] } + if ( entityMetamodel.hasNonIdentifierPropertyNamedId() ) { + subclassPropertyAliases.put( + ENTITY_ID + "." + idPropertyNames[i], + new String[] { idAliases[i] } ); - subclassPropertyColumnNames.put( - ENTITY_ID + "." + getIdentifierPropertyName() + "." + idPropertyName= s[i], - new String[] { idColumnNames[i] } + subclassPropertyColumnNames.put( + ENTITY_ID + "." + getIdentifierPropertyName() + "." + idPropertyNam= es[i], + new String[] { idColumnNames[i] } ); - if (hasIdentifierProperty() && !ENTITY_ID.equals( getIdentifierPropert= yName() ) ) { + } +// if (hasIdentifierProperty() && !ENTITY_ID.equals( getIdentifierPrope= rtyName() ) ) { + if ( hasIdentifierProperty() ) { subclassPropertyAliases.put( getIdentifierPropertyName() + "." + idPropertyNames[i], new String[] { idAliases[i] } - ); + ); subclassPropertyColumnNames.put( getIdentifierPropertyName() + "." + idPropertyNames[i], new String[] { idColumnNames[i] } - ); + ); } else { // embedded composite ids ( alias.idname1, alias.idname2 ) @@ -1554,10 +1559,8 @@ } = if ( entityMetamodel.isPolymorphic() ) { - subclassPropertyAliases.put( ENTITY_CLASS, - new String[]{getDiscriminatorAlias()} ); - subclassPropertyColumnNames.put( ENTITY_CLASS, - new String[]{getDiscriminatorColumnName()} ); + subclassPropertyAliases.put( ENTITY_CLASS, new String[] { getDiscrimina= torAlias() } ); + subclassPropertyColumnNames.put( ENTITY_CLASS, new String[] { getDiscri= minatorColumnName() } ); } = } @@ -1672,7 +1675,9 @@ if ( entityMetamodel.getIdentifierProperty().isEmbedded() ) { propertyMapping.initPropertyPaths( null, getIdentifierType(), getIdenti= fierColumnNames(), null, mapping ); } - propertyMapping.initPropertyPaths( ENTITY_ID, getIdentifierType(), getId= entifierColumnNames(), null, mapping ); + if ( ! entityMetamodel.hasNonIdentifierPropertyNamedId() ) { + propertyMapping.initPropertyPaths( ENTITY_ID, getIdentifierType(), getI= dentifierColumnNames(), null, mapping ); + } } = private void initDiscriminatorPropertyPath(Mapping mapping) throws Mappin= gException { @@ -3145,7 +3150,7 @@ return factory; } = - protected EntityMetamodel getEntityMetamodel() { + public EntityMetamodel getEntityMetamodel() { return entityMetamodel; } = Modified: branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity= /AbstractPropertyMapping.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity/Abstr= actPropertyMapping.java 2006-11-21 16:33:52 UTC (rev 10850) +++ branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity/Abstr= actPropertyMapping.java 2006-11-21 17:38:43 UTC (rev 10851) @@ -34,18 +34,14 @@ = public Type toType(String propertyName) throws QueryException { Type type =3D (Type) typesByPropertyPath.get(propertyName); - if (type=3D=3Dnull) throwPropertyException(propertyName); + if ( type =3D=3D null ) { + throw propertyException( propertyName ); + } return type; } = - protected final void throwPropertyException(String propertyName) = - throws QueryException { - throw new QueryException( - "could not resolve property: " + - propertyName + - " of: " + - getEntityName() - ); + protected final QueryException propertyException(String propertyName) { + return new QueryException( "could not resolve property: " + propertyName= + " of: " + getEntityName() ); } = public String[] getColumnNames(String propertyName) { @@ -56,11 +52,12 @@ return cols; } = - public String[] toColumns(String alias, String propertyName) - throws QueryException { + public String[] toColumns(String alias, String propertyName) throws Query= Exception { //TODO: *two* hashmap lookups here is one too many... String[] columns =3D (String[]) columnsByPropertyPath.get(propertyName); - if (columns=3D=3Dnull) throwPropertyException(propertyName); + if ( columns =3D=3D null ) { + throw propertyException( propertyName ); + } String[] templates =3D (String[]) formulaTemplatesByPropertyPath.get(pro= pertyName); String[] result =3D new String[columns.length]; for ( int i=3D0; i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/Order= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/Order.ja= va 2006-11-21 16:33:52 UTC (rev 10850) +++ branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/Order.ja= va 2006-11-21 17:38:43 UTC (rev 10851) @@ -0,0 +1,60 @@ +package org.hibernate.test.idprops; + +import java.util.Date; +import java.util.Set; +import java.util.HashSet; + +/** + * {@inheritDoc} + * + * @author Steve Ebersole + */ +public class Order { + private Long number; + private Date placed; + private Person orderee; + + private Set lineItems =3D new HashSet(); + + public Order() { + } + + public Order(Long number, Person orderee) { + this.number =3D number; + this.orderee =3D orderee; + this.placed =3D new Date(); + } + + public Long getNumber() { + return number; + } + + public void setNumber(Long number) { + this.number =3D number; + } + + public Date getPlaced() { + return placed; + } + + public void setPlaced(Date placed) { + this.placed =3D placed; + } + + public Person getOrderee() { + return orderee; + } + + public void setOrderee(Person orderee) { + this.orderee =3D orderee; + } + + + public Set getLineItems() { + return lineItems; + } + + public void setLineItems(Set lineItems) { + this.lineItems =3D lineItems; + } +} Added: branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/Perso= n.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/Person.j= ava 2006-11-21 16:33:52 UTC (rev 10850) +++ branches/Branch_3_2/Hibernate3/test/org/hibernate/test/idprops/Person.j= ava 2006-11-21 17:38:43 UTC (rev 10851) @@ -0,0 +1,45 @@ +package org.hibernate.test.idprops; + +/** + * {@inheritDoc} + * + * @author Steve Ebersole + */ +public class Person { + private Long pk; + private String name; + private int id; + + public Person() { + } + + public Person(Long pk, String name, int id) { + this.pk =3D pk; + this.name =3D name; + this.id =3D id; + } + + public Long getPk() { + return pk; + } + + public void setPk(Long pk) { + this.pk =3D pk; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name =3D name; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id =3D id; + } +} Modified: branches/Branch_3_2/Hibernate3/test/org/hibernate/test/legacy/Cus= tomPersister.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/Branch_3_2/Hibernate3/test/org/hibernate/test/legacy/CustomPer= sister.java 2006-11-21 16:33:52 UTC (rev 10850) +++ branches/Branch_3_2/Hibernate3/test/org/hibernate/test/legacy/CustomPer= sister.java 2006-11-21 17:38:43 UTC (rev 10851) @@ -11,6 +11,7 @@ import org.hibernate.HibernateException; import org.hibernate.LockMode; import org.hibernate.MappingException; +import org.hibernate.tuple.entity.EntityMetamodel; import org.hibernate.cache.CacheConcurrencyStrategy; import org.hibernate.cache.entry.CacheEntryStructure; import org.hibernate.cache.entry.UnstructuredCacheEntry; @@ -616,4 +617,8 @@ public Comparator getVersionComparator() { return null; } + + public EntityMetamodel getEntityMetamodel() { + return null; + } } --===============2411277410566165087==--