Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dali-dev] default schema in orm.xml?

After some additional investigation, it turns out that this functionality didn't completely stop working, but rather our assumptions changed on what was required to have it work. In 1.0.1 we made a change that lifted the requirement to have a reference to an orm.xml in the default location in the persistence.xml. Unfortunately, this broke our path to the schema default in the orm.xml due to the way we were getting the persistence-unit-defaults.

So, more simply put, the workaround in 1.0.1 is to have a mapping file reference in your persistence.xml, and we will correctly retrieve the default persistence unit schema. This config was required in 1.0, but not in 1.0.1, since the mapping file does not need to be referenced if it is in the default location with the default name (bug 190309). So, we have a fix for this issue(bug 207873), and will be checking it in for the next WTP 2.0.2 I-Build. At that point, your really won't need to have the reference if the defaults apply.

Sorry for the confusion.

Neil

Neil Hauge wrote:

Dali did pick up the default schema correctly in 1.0, but it appears this no longer works in 1.0.1. It appears that this functionality has regressed. I'll open a bug on this and make sure that it is fixed for an upcoming I-Build and for 1.0.2. Bug # 207873 .

As for the vendor specified schema concept, this is certainly a valid way to approach this problem. Extenders should be able to provide their own context which could set a another default.

Neil

Max Rydahl Andersen wrote:


Does Dali pick up the default schema from orm.xml ? I couldn't make it do so at least.

But furthermore it should not be an requirement to have an orm.xml just to be able to get proper validation working - I think most vendors support the notion of default schema Hibernate and openjpa does afaik, and from what I hear Neil say also toplink; so IMO this should be part of what the vendor specific platform can provide - namely which schema should be used as default given just the content of the persistence.xml

/max


Hi Neil,

Awhile back we were talking about the best way to set the default schema and you mentioned: "The persistence-unit-default schema setting defines the schema to be used when it is not otherwise specified for the entire persistence unit. I don't think that setting the schema through the vendor specific properties is the way to go. I'll try to confirm that orm.xml method does indeed work as expected on TopLink Essentials."

Did you (or anyone else on the list) ever get a chance to verify this? My thoughts were the same as yours, but I said that this was not working on OpenJPA. I asked on one of the mailing list and someone responded that they thought using the provider-specific property was indeed the way to go, because what if you you had multiple orm.xml files: which schema definition would be the right default one?

So I'm still a bit unsure - it still seems to me that using the provider-specific properties is a bit limiting, since that ties you to a specific platform, and the default schema really is not platform-specific at all.

-Tom


_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev



_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev





Back to the top