Community
Participate
Working Groups
Build Identifier: I20110613-1736 This is just something I keep forgetting when generating entities from tables. Finish is enabled immediately upon selecting tables then end up with the classes in the default package which typically isn't optimal. Reproducible: Always Steps to Reproduce: 1.JPA Project 2.Right Click Project->JPA Tools->Generated Entities from Tables 3.Select any table, Finish
This bug is closely related to bug 227851. There are a few different possible solutions to this issue. We can disable the Finish button until you get to the wizard page that contains the Package setting, allowing you to see the warning for use of default package. Another possibility is to prime the wizard with a default package name that could be removed or modified by the user, and allow the user to Finish from the first page. It has also been discussed in the referenced by to have a preference for default package that can be set for adopters and users alike.
Thanks Neil, Had I noticed that other bug, I probably would not have opened this one. I like the train of logic you suggest, it seems that holding up the Finish until a warning can be displayed seems like the least desirable option. Also, the notification area at the top of the wizard pages seems to be limited in the number of separate messages that can be displayed. So my vote would be for the default package preference. Would that be exposed in such a way that other contributers could adopt that paradigm, that sounds interesting.
Retargeting this to Juno stream.
An "Entity Generation From Tables" -> "Default package name" preference should be added to the JPA project properties. This should also be a workspace level preference that can be overridden per project. I'm open to suggestions on what the initial default would be. My first stab would simply be "model", but perhaps we can do better. By defining the preference, adopters could override this setting in adopter products.
A "Default package" preference has been added at the workspace level preferences and can be overridden at the project level if needed. If there is no default package name specified, "model" will be used. Fixed in M6.
Verified in Build S-3.4.0-20120319200442 Verified a default package appears when you generate Entities from Tables for a JPA project. Verified it can be changed in the Window>Preferences. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.2_M6