diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java index cdf4e2a343..c4515a0e2a 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 Oracle. All rights reserved. + * Copyright (c) 2009, 2011 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -102,13 +102,14 @@ public class GenericOrmIdDerivedIdentityStrategy2_0 // ********** validation ********** - public TextRange getValidationTextRange() { - return this.getXmlMapping().getIdTextRange(); - } - @Override public void validate(List<IMessage> messages, IReporter reporter) { super.validate(messages, reporter); // no validation rules } + + public TextRange getValidationTextRange() { + TextRange textRange = this.getXmlMapping().getIdTextRange(); + return (textRange != null) ? textRange : this.getDerivedIdentity().getValidationTextRange(); + } } |