[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [dali-dev] how do I generate entities from a different schema
|
Tom,
We have some problems with schema selection that we plan to address in
M6. I think there is a way to do what you want to do now though, if you
can avoid the holes. First, make sure you are not connected to the DB
(you may have to restart your workspace if you were connected) and then
select the Generate Entities menu item on a persistence project. When
not connected, this will bring up a dialog that will allow you to pick
the connection/schema you wish to generate from. From here you can
select a non-login schema and generate entities.
Also, you should pick up the latest JPA I-Build from last week, since it
has a number of additional features (including entity validation) and
should be more stable than the M5.
Let me know if you have any questions.
Neil
Tom Mutdosch wrote:
Hi there,
I am now using the latest Dali driver from WTP M5. Nice. This may
have already been mentioned, but one thing I'm wondering about that
differs from the 0.5 driver though - how do I select which schema is
used for my connection when generating entities? There used to be a
drop-down where I could select a schema when generating my entities.
It now looks like it is trying to get the schema for the logged-in
user. This is causing an NPE (which I will file a bug for) if such a
schema does not exist:
java.lang.NullPointerException
at
org.eclipse.jst.jpa.ui.wizards.GenerateEntitiesWizard.getPossibleTables(GenerateEntitiesWizard.java:108)
at
org.eclipse.jst.jpa.ui.wizards.GenerateEntitiesWizardPage.createControl(GenerateEntitiesWizardPage.java:120)
at
org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:259)
at
org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:629)
at
org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:514)
at org.eclipse.jface.window.Window.create(Window.java:426)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1111)
at
org.eclipse.jst.jpa.ui.actions.GenerateEntitiesAction.execute(GenerateEntitiesAction.java:60)
I'm not concerned about that; but my question is how can I create a
connection with one user, say DB2ADMIN, and then generate entities
from schema TOM? I tried setting the schema in the orm.xml, but it
doesn't seem to be picked up. What is the correct mechanism to do this
now? Should it be looking in the orm.xml?
Thanks,
Tom
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev