Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dali-dev] Re: schema for JPA connections

Thanks Adrian,

That does seem to be a pretty big limitation. In looking at that bug, it mentioned that the proper way to specify the default schema was to set it in the orm.xml. I have actually tried that approach many times without success (using both Toplink on Glassfish as well as open-jpa). That is, I set up the orm.xml properly, but the schema was ignored. I got the impression that the Java-annotated entities actually took precedence over any value specified in the orm.xml I actually asked on both of those mailing lists and the answer that I got seemed to be that the best way to set the schema was through the provider-specific properties. Can anyone confirm this? Or has anyone had success specifying a schema via the orm.xml?

Thanks
Tom
Message: 2
Date: Thu, 11 Oct 2007 17:39:12 +0200
From: "Goerler, Adrian" <adrian.goerler@xxxxxxx>
Subject: AW: [dali-dev] schema for JPA connections
To: "General Dali EJB ORM developer discussion."
	<dali-dev@xxxxxxxxxxx>
Message-ID:
	<8DD10CADA07AFC4DB4F550CE8D63619F046F1329@xxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain;	charset="iso-8859-1"

Hi Tom,

I think this is the same issue as
https://bugs.eclipse.org/bugs/show_bug.cgi?id=195095

My understanding of the situation is that schemaName=userName is hardwired, currently.

Adrian

-----Ursprüngliche Nachricht-----
Von: dali-dev-bounces@xxxxxxxxxxx [mailto:dali-dev-bounces@xxxxxxxxxxx] Im Auftrag von Tom Mutdosch
Gesendet: Donnerstag, 11. Oktober 2007 17:24
An: dali-dev@xxxxxxxxxxx
Betreff: [dali-dev] schema for JPA connections

Hi all,

Is the schema stored somewhere for the current Dali connection? I generated entitees from a non-default schema (ADMINISTRATOR) and I am seeing validation errors like:
    "Schema "db2admin" cannot be resolved for table "Department"

'db2admin' is the user name/default schema, not the schema that I used to generate entities. I thought I used to be able to set the schema on the JPA Property page, but I may have imagined that. Is there somewhere where this is stored? Note that I'm using the Dali 1.0 maintenance stream. Aside from validation, I'm interested in this because I'm trying to write some tooling to update the persistence.xml with the schema that the user generated entities from, such as:
<properties>
            <property name="openjpa.jdbc.Schema" value="ADMINISTRATOR"/>
</properties>

I need some way to figure out which schema was used when generating entities. I figured this must be stored somewhere in order to do validation. Is there a way that I could get that information somehow?

Thanks
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


End of dali-dev Digest, Vol 25, Issue 1
***************************************




Back to the top