Hibernate SVN: r18393 - in core/trunk/annotations/src: main/java/org/hibernate/cfg/annotations and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2010-01-04 11:47:08 -0500 (Mon, 04 Jan 2010)
New Revision: 18393
Added:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/Address.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/AttributeOverrideTest.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/PropertyInfo.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/PropertyRecord.java
Modified:
core/trunk/annotations/src/main/java/org/hibernate/cfg/AbstractPropertyHolder.java
core/trunk/annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java
Log:
HHH-4352 support for key. and value. for Map and @AttributeOverride. Managed to keep support for legacy names as well.
Modified: core/trunk/annotations/src/main/java/org/hibernate/cfg/AbstractPropertyHolder.java
===================================================================
--- core/trunk/annotations/src/main/java/org/hibernate/cfg/AbstractPropertyHolder.java 2010-01-04 16:03:21 UTC (rev 18392)
+++ core/trunk/annotations/src/main/java/org/hibernate/cfg/AbstractPropertyHolder.java 2010-01-04 16:47:08 UTC (rev 18393)
@@ -98,8 +98,48 @@
/**
* Get column overriding, property first, then parent, then holder
+ * replace
+ * - "index" by "key" if present
+ * - "element" by "value" if present
+ * These rules are here to support both JPA 2 and legacy overriding rules.
+ *
+ * WARNING: this can conflict with user's expectations if:
+ * - the property uses some restricted values
+ * - the user has overridden the column
+ * But this is unlikely and avoid the need for a "legacy" flag
*/
public Column[] getOverriddenColumn(String propertyName) {
+ Column[] result = getExactOverriddenColumn( propertyName );
+ if (result == null) {
+ if ( propertyName.contains( ".key." ) ) {
+ //TODO cache the underlying regexp
+ result = getExactOverriddenColumn( propertyName.replace( ".key.", ".index." ) );
+ }
+ if ( result == null && propertyName.endsWith( ".key" ) ) {
+ //TODO cache the underlying regexp
+ result = getExactOverriddenColumn(
+ propertyName.substring( 0, propertyName.length() - ".key".length() ) + ".index"
+ );
+ }
+ if ( result == null && propertyName.contains( ".value." ) ) {
+ //TODO cache the underlying regexp
+ result = getExactOverriddenColumn( propertyName.replace( ".value.", ".element." ) );
+ }
+ if ( result == null && propertyName.endsWith( ".value" ) ) {
+ //TODO cache the underlying regexp
+ result = getExactOverriddenColumn(
+ propertyName.substring( 0, propertyName.length() - ".value".length() ) + ".element"
+ );
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Get column overriding, property first, then parent, then holder
+ * find the overridden rules from the exact property name.
+ */
+ private Column[] getExactOverriddenColumn(String propertyName) {
Column[] override = null;
if ( parent != null ) {
override = parent.getOverriddenColumn( propertyName );
Modified: core/trunk/annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java
===================================================================
--- core/trunk/annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java 2010-01-04 16:03:21 UTC (rev 18392)
+++ core/trunk/annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java 2010-01-04 16:47:08 UTC (rev 18393)
@@ -1672,6 +1672,7 @@
//nullify empty array
keyColumns = keyColumns != null && keyColumns.length > 0 ? keyColumns : null;
+ //"mapkey" is the legacy column name of the key column pre JPA 2
PropertyData mapKeyVirtualProperty = new WrappedInferredData( inferredData, "mapkey" );
Ejb3Column[] mapColumns = Ejb3Column.buildColumnFromAnnotation(
keyColumns,
Modified: core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java
===================================================================
--- core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java 2010-01-04 16:03:21 UTC (rev 18392)
+++ core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java 2010-01-04 16:47:08 UTC (rev 18393)
@@ -1295,7 +1295,8 @@
throw new AssertionFailure( "Unable to guess collection property accessor name" );
}
- PropertyData inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "element", elementClass );
+ //"value" is the JPA 2 prefix for map values (used to be "element")
+ PropertyData inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "value", elementClass );
//TODO be smart with isNullable
Component component = AnnotationBinder.fillComponent(
holder, inferredData, isPropertyAnnotated ? AccessType.PROPERTY : AccessType.FIELD, true,
Modified: core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java
===================================================================
--- core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java 2010-01-04 16:03:21 UTC (rev 18392)
+++ core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java 2010-01-04 16:47:08 UTC (rev 18393)
@@ -174,10 +174,6 @@
else {
XClass elementClass;
AnnotatedClassType classType;
- // Map<String, javax.persistence.Column[]> columnOverrides = PropertyHolderBuilder.buildColumnOverride(
- // property, StringHelper.qualify( collValue.getRole(), "element" )
- // );
- //FIXME the "element" is lost
PropertyHolder holder = null;
if ( BinderHelper.PRIMITIVE_NAMES.contains( mapKeyType ) ) {
classType = AnnotatedClassType.NONE;
@@ -227,8 +223,8 @@
}
//boolean propertyAccess = embeddable == null || AccessType.PROPERTY.equals( embeddable.access() );
- //FIXME "index" is it right?
- PropertyData inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "index", elementClass );
+ //"key" is the JPA 2 prefix for map keys
+ PropertyData inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "key", elementClass );
//TODO be smart with isNullable
Component component = AnnotationBinder.fillComponent(
holder, inferredData, isPropertyAnnotated ? AccessType.PROPERTY : AccessType.FIELD, true,
Added: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/Address.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/Address.java (rev 0)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/Address.java 2010-01-04 16:47:08 UTC (rev 18393)
@@ -0,0 +1,14 @@
+package org.hibernate.test.annotations.override;
+
+import javax.persistence.Embedded;
+import javax.persistence.Embeddable;
+
+/**
+ * @author Emmanuel Bernard
+ */
+@Embeddable
+public class Address {
+ public String street;
+ public String city;
+ public String state;
+}
Added: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/AttributeOverrideTest.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/AttributeOverrideTest.java (rev 0)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/AttributeOverrideTest.java 2010-01-04 16:47:08 UTC (rev 18393)
@@ -0,0 +1,46 @@
+package org.hibernate.test.annotations.override;
+
+import java.util.Iterator;
+
+import org.hibernate.test.annotations.TestCase;
+import org.hibernate.metadata.CollectionMetadata;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.persister.collection.CollectionPersister;
+import org.hibernate.mapping.Table;
+import org.hibernate.mapping.Column;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class AttributeOverrideTest extends TestCase {
+ public void testMapKeyValue() throws Exception {
+ assertTrue( isColumnPresent( "PropertyRecord_parcels", "ASSESSMENT") );
+ assertTrue( isColumnPresent( "PropertyRecord_parcels", "SQUARE_FEET") );
+ assertTrue( isColumnPresent( "PropertyRecord_parcels", "STREET_NAME") );
+ }
+
+ public boolean isColumnPresent(String tableName, String columnName) {
+ final Iterator<Table> tables = ( Iterator<Table> ) getCfg().getTableMappings();
+ while (tables.hasNext()) {
+ Table table = tables.next();
+ if (tableName.equals( table.getName() ) ) {
+ Iterator<Column> columns = (Iterator<Column>) table.getColumnIterator();
+ while ( columns.hasNext() ) {
+ Column column = columns.next();
+ if ( columnName.equals( column.getName() ) ) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ protected Class<?>[] getMappings() {
+ return new Class<?>[] {
+ PropertyInfo.class,
+ PropertyRecord.class,
+ Address.class
+ };
+ }
+}
Added: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/PropertyInfo.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/PropertyInfo.java (rev 0)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/PropertyInfo.java 2010-01-04 16:47:08 UTC (rev 18393)
@@ -0,0 +1,14 @@
+package org.hibernate.test.annotations.override;
+
+import java.math.BigDecimal;
+import javax.persistence.Embeddable;
+
+/**
+ * @author Emmanuel Bernard
+ */
+@Embeddable
+public class PropertyInfo {
+ public Integer parcelNumber;
+ public Integer size;
+ public BigDecimal tax;
+}
Added: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/PropertyRecord.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/PropertyRecord.java (rev 0)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/override/PropertyRecord.java 2010-01-04 16:47:08 UTC (rev 18393)
@@ -0,0 +1,28 @@
+package org.hibernate.test.annotations.override;
+
+import java.util.Map;
+import javax.persistence.AttributeOverride;
+import javax.persistence.AttributeOverrides;
+import javax.persistence.Column;
+import javax.persistence.ElementCollection;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+/**
+ * @author Emmanuel Bernard
+ */
+@Entity
+public class PropertyRecord {
+ @Id
+ @GeneratedValue
+ public Long id;
+
+ @AttributeOverrides({
+ @AttributeOverride(name = "key.street", column = @Column(name = "STREET_NAME")),
+ @AttributeOverride(name = "value.size", column = @Column(name = "SQUARE_FEET")),
+ @AttributeOverride(name = "value.tax", column = @Column(name = "ASSESSMENT"))
+ })
+ @ElementCollection
+ public Map<Address, PropertyInfo> parcels;
+}
\ No newline at end of file
14 years, 12 months
Hibernate SVN: r18392 - core/trunk/annotations/src/test/java/org/hibernate/test/annotations/embedded.
by hibernate-commits@lists.jboss.org
Author: smarlow(a)redhat.com
Date: 2010-01-04 11:03:21 -0500 (Mon, 04 Jan 2010)
New Revision: 18392
Added:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/embedded/WealthyPerson.java
Modified:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/embedded/EmbeddedTest.java
Log:
HHH-4682 Check that @CollectionTable (or its absence) defaults to the right table/column names
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/embedded/EmbeddedTest.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/embedded/EmbeddedTest.java 2010-01-04 15:57:18 UTC (rev 18391)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/embedded/EmbeddedTest.java 2010-01-04 16:03:21 UTC (rev 18392)
@@ -365,6 +365,50 @@
s.close();
}
+ // quick test based on testSimple
+ public void testCollectionTable() throws Exception {
+ Session s;
+ Transaction tx;
+ WealthyPerson p = new WealthyPerson();
+ Address a = new Address();
+ Address vacation = new Address();
+ Country c = new Country();
+ Country bornCountry = new Country();
+ c.setIso2( "DM" );
+ c.setName( "Matt Damon Land" );
+ bornCountry.setIso2( "US" );
+ bornCountry.setName( "United States of America" );
+
+ a.address1 = "colorado street";
+ a.city = "Springfield";
+ a.country = c;
+ vacation.address1 = "rock street";
+ vacation.city = "Plymouth";
+ vacation.country = c;
+ p.vacationHomes.add(vacation);
+ p.address = a;
+ p.bornIn = bornCountry;
+ p.name = "Homer";
+ s = openSession();
+ tx = s.beginTransaction();
+ s.persist( p );
+ tx.commit();
+ s.close();
+
+ s = openSession();
+ tx = s.beginTransaction();
+ p = (WealthyPerson) s.get( WealthyPerson.class, p.id );
+ assertNotNull( p );
+ assertNotNull( p.address );
+ assertEquals( "Springfield", p.address.city );
+ assertNotNull( p.address.country );
+ assertEquals( "DM", p.address.country.getIso2() );
+ assertNotNull( p.bornIn );
+ assertEquals( "US", p.bornIn.getIso2() );
+ tx.commit();
+ s.close();
+ }
+
public EmbeddedTest(String x) {
super( x );
}
@@ -372,6 +416,7 @@
protected Class[] getMappings() {
return new Class[]{
Person.class,
+ WealthyPerson.class,
RegionalArticle.class,
AddressType.class,
VanillaSwap.class,
Added: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/embedded/WealthyPerson.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/embedded/WealthyPerson.java (rev 0)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/embedded/WealthyPerson.java 2010-01-04 16:03:21 UTC (rev 18392)
@@ -0,0 +1,31 @@
+package org.hibernate.test.annotations.embedded;
+
+import javax.persistence.AttributeOverride;
+import javax.persistence.AttributeOverrides;
+import javax.persistence.CollectionTable;
+import javax.persistence.Column;
+import javax.persistence.ElementCollection;
+import javax.persistence.Embedded;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+
+@Entity
+public class WealthyPerson extends Person {
+
+ @ElementCollection
+ @CollectionTable(name="XXXHOMES")
+ @AttributeOverrides({
+ @AttributeOverride(name="address1",
+ column=@Column(name="HOME_STREET")),
+ @AttributeOverride(name="city",
+ column=@Column(name="HOME_CITY")),
+ @AttributeOverride(name="country",
+ column=@Column(name="HOME_COUNTRY"))
+ })
+ protected Set<Address> vacationHomes = new HashSet();
+}
14 years, 12 months
Hibernate SVN: r18391 - core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-04 10:57:18 -0500 (Mon, 04 Jan 2010)
New Revision: 18391
Modified:
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy/CustomSQL.hbm.xml
Log:
JBPAPP-3325 org.hibernate.test.legacy.CustomSQLTest.testInsert fails on most of DBs
Modified: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy/CustomSQL.hbm.xml
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy/CustomSQL.hbm.xml 2010-01-04 15:13:07 UTC (rev 18390)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy/CustomSQL.hbm.xml 2010-01-04 15:57:18 UTC (rev 18391)
@@ -38,7 +38,7 @@
deleteAllRoleBunchOfString(?)}</sql-delete-all>
</list>
- <sql-insert>insert into Role (name, id) values (?, ?) /** i did this*/</sql-insert>
+ <sql-insert>insert into Role (name) values (?) /** i did this*/</sql-insert>
<sql-delete>delete from Role where id=?</sql-delete>
</class>
14 years, 12 months
Hibernate SVN: r18390 - beanvalidation/api/trunk/src/main/java/javax/validation.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-01-04 10:13:07 -0500 (Mon, 04 Jan 2010)
New Revision: 18390
Modified:
beanvalidation/api/trunk/src/main/java/javax/validation/ConstraintValidatorContext.java
Log:
BVAL-196
Modified: beanvalidation/api/trunk/src/main/java/javax/validation/ConstraintValidatorContext.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/ConstraintValidatorContext.java 2010-01-04 15:03:09 UTC (rev 18389)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/ConstraintValidatorContext.java 2010-01-04 15:13:07 UTC (rev 18390)
@@ -195,7 +195,7 @@
/**
* Represent refinement choices for a node which is
- * in an <code>Iterator<code> or <code>Map</code>.
+ * in an <code>Iterator</code> or <code>Map</code>.
* If the iterator is an indexed collection or a map,
* the index or the key should be set.
*/
14 years, 12 months
Hibernate SVN: r18389 - core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-04 10:03:09 -0500 (Mon, 04 Jan 2010)
New Revision: 18389
Modified:
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java
Log:
JBPAPP-3323 org.hibernate.test.legacy.SQLFunctionsTest.testDialectSQLFunctions fails on oracle
Modified: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java 2010-01-04 14:53:37 UTC (rev 18388)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java 2010-01-04 15:03:09 UTC (rev 18389)
@@ -100,7 +100,7 @@
// Test a larger depth 3 function example - Not a useful combo other than for testing
assertTrue(
- s.find("select trunc(round(sysdate())) from Simple s").size() == 1
+ s.find("select trunc(round(sysdate)) from Simple s").size() == 1
);
// Test the oracle standard NVL funtion as a test of multi-param functions...
14 years, 12 months
Hibernate SVN: r18388 - core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/fetching.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-04 09:53:37 -0500 (Mon, 04 Jan 2010)
New Revision: 18388
Modified:
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/fetching/Mappings.hbm.xml
Log:
JBPAPP-3321 keywords 'on oracle cause test cases fail
Modified: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/fetching/Mappings.hbm.xml
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/fetching/Mappings.hbm.xml 2010-01-04 14:08:56 UTC (rev 18387)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/fetching/Mappings.hbm.xml 2010-01-04 14:53:37 UTC (rev 18388)
@@ -47,7 +47,7 @@
</id>
<property name="description" type="string"/>
<many-to-one name="user" column="user234"/>
- <many-to-one name="resource" />
+ <many-to-one name="resource" column="`resource`"/>
<property name="dueDate" type="timestamp"/>
<property name="startDate" type="timestamp"/>
<property name="completionDate" type="timestamp"/>
14 years, 12 months
Hibernate SVN: r18387 - validator/trunk/hibernate-validator/src/main/resources/org/hibernate/validator.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-01-04 09:08:56 -0500 (Mon, 04 Jan 2010)
New Revision: 18387
Added:
validator/trunk/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_tr.properties
Log:
HV-227 added turkish translations
Added: validator/trunk/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_tr.properties
===================================================================
--- validator/trunk/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_tr.properties (rev 0)
+++ validator/trunk/hibernate-validator/src/main/resources/org/hibernate/validator/ValidationMessages_tr.properties 2010-01-04 14:08:56 UTC (rev 18387)
@@ -0,0 +1,17 @@
+javax.validation.constraints.AssertFalse.message=teyit ba\u015far\u0131s\u0131z
+javax.validation.constraints.AssertTrue.message=teyit ba\u015far\u0131s\u0131z
+javax.validation.constraints.DecimalMax.message='{value}' de\u011ferinden k\u00fc\u00e7\u00fck yada e\u015fit olmal\u0131
+javax.validation.constraints.DecimalMin.message='{value}' de\u011ferinden b\u00fcy\u00fck yada e\u015fit olmal\u0131
+javax.validation.constraints.Digits.message=s\u0131n\u0131rlar\u0131n d\u0131\u015f\u0131nda say\u0131sal de\u011fer (beklenen <{integerDigits} basamak>.<{fractionalDigits} basamak>)
+javax.validation.constraints.Future.message=ileri bir tarih olmal\u0131
+javax.validation.constraints.Max.message='{value}' de\u011ferinden k\u00fc\u00e7\u00fck yada e\u015fit olmal\u0131
+javax.validation.constraints.Min.message='{value}' de\u011ferinden b\u00fcy\u00fck yada e\u015fit olmal\u0131
+javax.validation.constraints.NotNull.message=bo\u015f de\u011fer olamaz
+javax.validation.constraints.Null.message=bo\u015f de\u011fer olmal\u0131
+javax.validation.constraints.Past.message=ge\u00e7mi\u015f bir tarih olmal\u0131
+javax.validation.constraints.Pattern.message='{regexp}' ile e\u015fle\u015fmeli
+javax.validation.constraints.Size.message=boyut '{min}' ile '{max}' aras\u0131nda olmal\u0131
+org.hibernate.validator.constraints.Length.message=uzunluk '{min}' ile '{max}' aras\u0131nda olmal\u0131
+org.hibernate.validator.constraints.NotEmpty.message=bo\u015f de\u011fer olamaz
+org.hibernate.validator.constraints.Email.message=d\u00fczg\u00fcn bi\u00e7imli bir e-posta adresi de\u011fil!
+org.hibernate.validator.constraints.Range.message={min} ve {max} aras\u0131nda olmal\u0131d\u0131r!
14 years, 12 months
Hibernate SVN: r18386 - core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-04 06:40:15 -0500 (Mon, 04 Jan 2010)
New Revision: 18386
Modified:
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java
Log:
JBPAPP-3323 org.hibernate.test.legacy.SQLFunctionsTest.testDialectSQLFunctions fails on oracle
Modified: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java 2010-01-04 10:28:08 UTC (rev 18385)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java 2010-01-04 11:40:15 UTC (rev 18386)
@@ -85,7 +85,7 @@
if ( getDialect() instanceof Oracle9iDialect ) {
// Check Oracle Dialect mix of dialect functions - no args (no parenthesis and single arg functions
- java.util.List rset = s.find("select s.name, sysdate(), trunc(s.pay), round(s.pay) from Simple s");
+ java.util.List rset = s.find("select s.name, sysdate, trunc(s.pay), round(s.pay) from Simple s");
assertNotNull("Name string should have been returned",(((Object[])rset.get(0))[0]));
assertNotNull("Todays Date should have been returned",(((Object[])rset.get(0))[1]));
assertEquals("trunc(45.8) result was incorrect ", new Float(45), ( (Object[]) rset.get(0) )[2] );
14 years, 12 months
Hibernate SVN: r18385 - entitymanager/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/ejb/test/transaction.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-04 05:28:08 -0500 (Mon, 04 Jan 2010)
New Revision: 18385
Modified:
entitymanager/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/ejb/test/transaction/FlushAndTransactionTest.java
Log:
JBPAPP-3315 default batch_versioned_data =true cause two test case fails on oracle
Modified: entitymanager/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/ejb/test/transaction/FlushAndTransactionTest.java
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/ejb/test/transaction/FlushAndTransactionTest.java 2010-01-04 10:16:38 UTC (rev 18384)
+++ entitymanager/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/ejb/test/transaction/FlushAndTransactionTest.java 2010-01-04 10:28:08 UTC (rev 18385)
@@ -2,6 +2,8 @@
package org.hibernate.ejb.test.transaction;
import java.util.List;
+import java.util.Map;
+
import javax.persistence.EntityManager;
import javax.persistence.LockModeType;
import javax.persistence.RollbackException;
@@ -9,6 +11,7 @@
import javax.persistence.PersistenceException;
import javax.persistence.OptimisticLockException;
+import org.hibernate.cfg.Environment;
import org.hibernate.ejb.HibernateEntityManagerFactory;
import org.hibernate.ejb.test.TestCase;
import org.hibernate.stat.Statistics;
@@ -73,6 +76,13 @@
// em.close();
// }
+ @Override
+ public Map getConfig() {
+ Map map=super.getConfig();
+ map.put( Environment.BATCH_VERSIONED_DATA , false );
+ return map;
+ }
+
public void testTransactionalOperationsWhenExtended() throws Exception {
Book book = new Book();
book.name = "Le petit prince";
14 years, 12 months
Hibernate SVN: r18384 - core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/fetching.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-04 05:16:38 -0500 (Mon, 04 Jan 2010)
New Revision: 18384
Modified:
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/fetching/Mappings.hbm.xml
Log:
JBPAPP-3321 keywords 'on oracle cause test cases fail
Modified: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/fetching/Mappings.hbm.xml
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/fetching/Mappings.hbm.xml 2010-01-04 10:03:22 UTC (rev 18383)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/fetching/Mappings.hbm.xml 2010-01-04 10:16:38 UTC (rev 18384)
@@ -47,7 +47,7 @@
</id>
<property name="description" type="string"/>
<many-to-one name="user" column="user234"/>
- <many-to-one name="resource"/>
+ <many-to-one name="resource" />
<property name="dueDate" type="timestamp"/>
<property name="startDate" type="timestamp"/>
<property name="completionDate" type="timestamp"/>
14 years, 12 months