This is an automated email from the ASF dual-hosted git repository.
solomax pushed a commit to branch javax-index
in repository https://gitbox.apache.org/repos/asf/openjpa.git
The following commit(s) were added to refs/heads/javax-index by this push:
new d1e4c11 [OPENJPA-2777] messages are corrected
d1e4c11 is described below
commit d1e4c110e60a1eae335de3c3a26ad639f0cfde0f
Author: Maxim Solodovnik <[email protected]>
AuthorDate: Sun Mar 3 15:06:16 2019 +0700
[OPENJPA-2777] messages are corrected
---
.../src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java | 4 ++--
.../main/resources/org/apache/openjpa/jdbc/meta/localizer.properties | 5 +++++
.../org/apache/openjpa/persistence/jdbc/localizer.properties | 4 ++++
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git
a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java
b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java
index 1b384a6..60cc2a0 100644
---
a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java
+++
b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java
@@ -520,7 +520,7 @@ public class ClassMappingInfo
public void addIndex(DBIdentifier table, Index idx) {
if (!DBIdentifier.equal(_tableName, table) &&
(_seconds == null || !_seconds.containsKey(table))) {
- throw new UserException(_loc.get("unique-no-table",
+ throw new UserException(_loc.get("index-no-table",
new Object[]{table, _className, _tableName,
((_seconds == null) ? "" : _seconds.keySet())}));
}
@@ -611,7 +611,7 @@ public class ClassMappingInfo
DBIdentifier columnName =
templateColumns[i].getIdentifier();
if (!table.containsColumn(columnName)) {
throw new UserException(_loc.get(
- "unique-missing-column",
+ "index-missing-column",
new Object[]{cm, columnName, tableName,
Arrays.toString(table.getColumnNames())}));
}
diff --git
a/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
b/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
index 36079b2..f267615 100644
---
a/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
+++
b/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
@@ -416,6 +416,11 @@ unique-missing-column: The column "{1}" in a unique
constraint in "{0}" on \
unique-no-table: A unique constraint on table "{0}" can not be added to \
mapping of class "{1}" because the table does neither match its primary
\
table "{2}" nor any of its secondary table(s) "{3}".
+index-no-table: Index on table "{0}" can not be added to \
+ mapping of class "{1}" because the table does neither match its primary
\
+ table "{2}" nor any of its secondary table(s) "{3}".
+index-missing-column: The column "{1}" in a index in "{0}" on \
+ table "{2}" can not be found in the list of available columns "{3}".
bad-version-column-table: One of the version column "{0}" has been associated \
with table "{1}", but no primary or secondary table of such name exists.
version-type-unsupported: Version field "{0}" of {1} is not supported.
diff --git
a/openjpa-persistence-jdbc/src/main/resources/org/apache/openjpa/persistence/jdbc/localizer.properties
b/openjpa-persistence-jdbc/src/main/resources/org/apache/openjpa/persistence/jdbc/localizer.properties
index f31c6de..b4ab97c 100644
---
a/openjpa-persistence-jdbc/src/main/resources/org/apache/openjpa/persistence/jdbc/localizer.properties
+++
b/openjpa-persistence-jdbc/src/main/resources/org/apache/openjpa/persistence/jdbc/localizer.properties
@@ -53,6 +53,10 @@ unique-empty-column: A unique constraint "{0}" specified in
mapping of class \
unique-many-on-seq-unsupported: More than one unique constraints is specified \
on sequence generator "{1}" in "{0}". But multiple unique constraint on
\
sequence generator is currently not supported.
+index-no-column: An index specified in mapping of "{0}" specified \
+ no column.
+index-empty-column: An index "{0}" specified in mapping of class \
+ "{1}" includes an empty column.
discriminator-on-abstract-class: A discriminator value has been specified for \
the abstract class "{0}". The discriminator will never be used and may
be \
safely removed.