Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » using synonyms resolving to tables in another schema
using synonyms resolving to tables in another schema [message #517114] Fri, 26 February 2010 10:08 Go to next message
Ari Meyer is currently offline Ari MeyerFriend
Messages: 136
Registered: July 2009
Senior Member
Hi,

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? Any
better techniques to deal with multiple schemas?

Thanks again,
Ari
Re: using synonyms resolving to tables in another schema [message #517236 is a reply to message #517114] Fri, 26 February 2010 16:25 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
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 #517368 is a reply to message #517236] Sat, 27 February 2010 04:32 Go to previous messageGo to next message
Ari Meyer is currently offline Ari MeyerFriend
Messages: 136
Registered: July 2009
Senior Member
Thanks, Brian. I'll definitely try specifying the schema in the
annotations -- that sounds like a much better solution than relying on
synonyms solely for this purpose.

Best regards,
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 #517538 is a reply to message #517236] Mon, 01 March 2010 09:01 Go to previous messageGo to next message
Ari Meyer is currently offline Ari MeyerFriend
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 #517626 is a reply to message #517538] Mon, 01 March 2010 15:01 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Quote:
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?


Unless you can query both databases from the same session, you are correct: you are out of luck. Support for multiple persistence units is not in Dali's near future. Sorry about that.

Brian
Re: using synonyms resolving to tables in another schema [message #517726 is a reply to message #517626] Mon, 01 March 2010 20:25 Go to previous message
Ari Meyer is currently offline Ari MeyerFriend
Messages: 136
Registered: July 2009
Senior Member
Gotcha -- thanks for the confirmation.
Ari

Brian Vosburgh wrote:
> Quote:
>> 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?
>
>
> Unless you can query both databases from the same session, you are
> correct: you are out of luck. Support for multiple persistence units is
> not in Dali's near future. Sorry about that.
>
> Brian
>
Re: using synonyms resolving to tables in another schema [message #618863 is a reply to message #517114] Fri, 26 February 2010 16:25 Go to previous message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
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 #618865 is a reply to message #618863] Sat, 27 February 2010 09:23 Go to previous message
Ari Meyer is currently offline Ari MeyerFriend
Messages: 136
Registered: July 2009
Senior Member
Thanks, Brian. I'll definitely try specifying the schema in the
annotations -- that sounds like a much better solution than relying on
synonyms solely for this purpose.

Best regards,
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 Go to previous message
Ari Meyer is currently offline Ari MeyerFriend
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 #618867 is a reply to message #517538] Mon, 01 March 2010 15:01 Go to previous message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Quote:
> 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?


Unless you can query both databases from the same session, you are correct: you are out of luck. Support for multiple persistence units is not in Dali's near future. Sorry about that.

Brian
Re: using synonyms resolving to tables in another schema [message #618868 is a reply to message #618867] Mon, 01 March 2010 20:25 Go to previous message
Ari Meyer is currently offline Ari MeyerFriend
Messages: 136
Registered: July 2009
Senior Member
Gotcha -- thanks for the confirmation.
Ari

Brian Vosburgh wrote:
> Quote:
>> 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?
>
>
> Unless you can query both databases from the same session, you are
> correct: you are out of luck. Support for multiple persistence units is
> not in Dali's near future. Sorry about that.
>
> Brian
>
Previous Topic:Mapping file "META-INF/orm.xml" does not have ORM content
Next Topic:EclipseLink, DDL and INTERACT_WITH_DB
Goto Forum:
  


Current Time: Thu Apr 25 09:54:47 GMT 2024

Powered by FUDForum. Page generated in 0.04482 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top