Michael Watzek wrote:
Hi Michelle,
your proposal is to use the same SQL schema (e.g.
applicationidentity99) for different mappings. The build process seems
to assume a 1:1 relationship between SQL schema and mapping. Moreover,
the current build process implements a 1:1 relationship between SQL
file and mapping. So, using the same schema in different SQL files
might be confusing.
Michael and I discussed the proposal. We think that it makes sense to
introduce a separate SQL schema for each mapping. Each SQL file
specifies a different schema name. The schema name may differ from the
current naming pattern "<identity type><mapping id>" to indicate that
the schema name is set by ORM meta data rather than by
"jdori.properties". For example, we could use
"applicationidentity_ORM", "applicationidentity_PKG", and
"applicationidentity_CLS" as schema names.
These are all good ideas. I will make the changes.
Perhaps, it makes sense to map to different table names in each
mapping, too. This ensures, that an error is thrown in case that an
implementation mistakenly ignores the schema in the ORM meta data and,
maps to a table in the default schema.
I thought of this issue, but I don't think it is necessary to change the
table names. If the implementation ignores the schema in the orm
metadata, it will use the schema specified in the PMF properties. There
is no other default schema. The schema specified in the PMF properties
does not exist, so an error will be thrown. For example, schema2.sql
will create schema applicationidentity_ORM or datastoreidentity_ORM.
Schema applicationidentity2 never gets created by any schema*.sql. But
the jdo.tck.mapping value for schema2.sql is '2'. Therefore the schema
value in the PMF properties is applicationidentity2. If the impl uses
this value, an error will be thrown. Make sense?
-- Michelle
What do you think?
Regards,
Michael