You could use the equivalent of SessionBroker, a bug exist about
the lost of this functionality when moving to JPA -> https://bugs.eclipse.org/bugs/show_bug.cgi?id=260258
However, I wrote an implementation that work with JPA. You can
find the code under many EclipseLink bugs test case like:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=283767
See inside the zip ->
JPACustomization[1].zip\JPACustomization\JPABroker\projects\com\saic\ct\sys\persistence\jpa
I use this implementation in production. Let me know if you find an issue.
From:
eclipselink-users-bounces@xxxxxxxxxxx
[mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of Christopher.Mathrusse@xxxxxxxxxx
Sent: Tuesday, December 15, 2009 7:15 PM
To: EclipseLink User Discussions
Cc: eclipselink-users-bounces@xxxxxxxxxxx
Subject: Re: [eclipselink-users] Entities spanning multiple databases
So if I were to give the catalog, schema and
table name to the @Table annotation, how would the generated SQL look?
Chris Mathrusse
christopher.mathrusse@xxxxxxxxxx
Sybase, Inc
One Sybase Drive
Dublin, CA 94568
(925) 236-5553
From:
|
Tim
Hollosy <hollosyt@xxxxxxxxx>
|
To:
|
EclipseLink
User Discussions <eclipselink-users@xxxxxxxxxxx>
|
Date:
|
12/15/2009
03:46 PM
|
Subject:
|
Re:
[eclipselink-users] Entities spanning multiple databases
|
Sent by:
|
<eclipselink-users-bounces@xxxxxxxxxxx>
|
Ah, alright I'm not familiar with ASE, perhaps the catalog attribute on the
@Table annotation is what you're looking for?
./tch
On Tue, Dec 15, 2009 at 6:32 PM, <Christopher.Mathrusse@xxxxxxxxxx>
wrote:
Then where
would I specify the database name? With ASE, the syntax is
<database>.<schema>.<table>, and if I specify
customer..customers, it translates to customer.dbo.customers. (dbo is assumed
when unspecified) So I'm still left with a need to specify the database name.
Chris Mathrusse
christopher.mathrusse@xxxxxxxxxx
Sybase, Inc
One Sybase
Drive
Dublin, CA 94568
(925) 236-5553
would the @Table(name="customer",schema="customer")
work for you?
./tch
On Tue, Dec 15, 2009 at 4:06 PM, <Christopher.Mathrusse@xxxxxxxxxx> wrote:
> I'm using EclipseLink and working with a legacy Sybase ASE database.
The
> model is terrible and spans over multiple databases (but on the same
> server). Is it possible to have EclipseLink access tables residing in
other
> databases? I was thinking of something like
>
> @Table(name="customer..customers")
>
> I currently have an existing application using iBatis and this is how
I can
> retrieve objects from multiple tables residing in different databases
(but
> on the same server). I'm reasonably certain that this would work with
> EclipseLink but I was just wondering if anyone had tried and if there
is a
> cleaner way of accomplishing this.
>
> Thanks for the help..
>
> Chris Mathrusse
> christopher.mathrusse@xxxxxxxxxx
> Sybase, Inc
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users