|
|
|
Re: using synonyms resolving to tables in another schema [message #517538 is a reply to message #517236] |
Mon, 01 March 2010 09:01 |
Ari Meyer Messages: 136 Registered: July 2009 |
Senior Member |
|
|
Hi Brian,
I now remembered what the problem I faced before was: it wasn't just
dealing with different schemas, but different database instances! Is it
possible to handle this without resorting to synonyms? A
<persistence-unit/> in persistence.xml can only have one
<jta-data-source/> element, so I think I'm out of luck on this one, correct?
Thanks,
Ari
Brian Vosburgh wrote:
> Quote:
>> In another case where something works fine with Eclipselink JPA 2.0 at
>> runtime but causes validation errors in Dali, I'm using synonyms that
>> resolve to tables in another schema (to try to circumvent the lack of
>> multiple persistence unit support in Dali). Dali reports:
>>
>> Table "XXX" cannot be resolved
>>
>> for all the synonyms. Can I do anything about this on my end?
>
>
> How Dali handles synonyms is determined by your DTP adapter, which, in
> turn, is determined by your JDBC driver. This issue is discussed at
> length in bug 269057[1]; where someone else wanted Dali to ignore
> synonyms. :-)
>
> Quote:
>> Any better techniques to deal with multiple schemas?
>
>
> You could explicitly specify your schema in your Java annotations that
> reference any tables in a non-default schema. Also, you could override
> you Java annotation with settings in your orm.xml.
>
> Brian
>
> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=269057
|
|
|
|
|
|
|
Re: using synonyms resolving to tables in another schema [message #618866 is a reply to message #618863] |
Mon, 01 March 2010 09:01 |
Ari Meyer Messages: 136 Registered: July 2009 |
Senior Member |
|
|
Hi Brian,
I now remembered what the problem I faced before was: it wasn't just
dealing with different schemas, but different database instances! Is it
possible to handle this without resorting to synonyms? A
<persistence-unit/> in persistence.xml can only have one
<jta-data-source/> element, so I think I'm out of luck on this one, correct?
Thanks,
Ari
Brian Vosburgh wrote:
> Quote:
>> In another case where something works fine with Eclipselink JPA 2.0 at
>> runtime but causes validation errors in Dali, I'm using synonyms that
>> resolve to tables in another schema (to try to circumvent the lack of
>> multiple persistence unit support in Dali). Dali reports:
>>
>> Table "XXX" cannot be resolved
>>
>> for all the synonyms. Can I do anything about this on my end?
>
>
> How Dali handles synonyms is determined by your DTP adapter, which, in
> turn, is determined by your JDBC driver. This issue is discussed at
> length in bug 269057[1]; where someone else wanted Dali to ignore
> synonyms. :-)
>
> Quote:
>> Any better techniques to deal with multiple schemas?
>
>
> You could explicitly specify your schema in your Java annotations that
> reference any tables in a non-default schema. Also, you could override
> you Java annotation with settings in your orm.xml.
>
> Brian
>
> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=269057
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04420 seconds