Bug 291311 - "Exclude unlisted classes" checkbox does not behave correctly
Summary: "Exclude unlisted classes" checkbox does not behave correctly
Status: CLOSED WORKSFORME
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: 2.2.1   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2009-10-05 04:18 EDT by Kaloyan Raev CLA
Modified: 2012-10-02 16:45 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kaloyan Raev CLA 2009-10-05 04:18:52 EDT
Using Eclipse for Java EE Developers Galileo SR1. 

1. Create new DB connection. 
  1.1. Call the New Connection Profile wizard. 
  1.2. Choose Derby. Next. 
  1.3. Click on the New Driver Definition button. 
  1.4. Choose Derby Embedded JDBC Driver 10.2. 
  1.5. Switch to the Jar List tab. 
  1.6. Point to the correct location of the derby.jar on the file system. (In my case this is the derby.jar version 10.5.3.0). 
  1.7. Click the OK button. 
  1.8. Give "app" for User name and Password. 
  1.9. Select the Save password checkbox. 
  1.10. Click the Finish button. 
2. Create new JPA project. 
  2.1. Call the New JPA Project wizard. 
  2.2. Give project name and advance to the third wizard page - JPA Facet. 
  2.3. Change Platform to EclipseLink 1.1.x. 
  2.4. The JPA implementation is already preselected to EclipseLink 1.1.x. The EclipseLink bundles are listed below. 
  2.5. In Connection choose the newly created Derby connection. 
  2.6. Change Persistent class management to "Discover annotated classes automatically". <--- NOTICE THIS !
  2.7. Click the Finish button. 
3. Creata a JPA entity. 
  3.1. Call the New Entity wizard. 
  3.2. Give some package name and class name and go to the next page. 
  3.3. Create a couple of Entity fields and make one of them a key. 
  3.4. Click the Finish button. 
4. Generate DB tables from the JPA entities. 
  4.1. Right-click on the JPA project > JPA Tools > Generate Tables from Entities...
  4.2. The task completes successfully, but no table is generated! <--- PROBLEM !
  4.3. Open the persistent.xml file. 
  4.4. Expand the Managed Classes section. The checkbox displays "Exclude unlisted classes (False)" and is in default selection state. 
  4.5. Explicitly deselect the checkbox. Save the editor. <--- WORKAROUND !
  4.6. Call again the Generate Tables from Entities... action. Now the DB table is generated successfully. 

The default "(False)" selection of the "Exclude unlisted classes" checkbox should have the same effect as it is explicitly unchecked. This is at least what users expect when the choose the correct radio box in step 2.6. The workaround at 4.5. is not very intuitive.
Comment 1 Neil Hauge CLA 2009-11-06 16:17:29 EST
(In reply to comment #0)
>   4.2. The task completes successfully, but no table is generated! <--- PROBLEM
> !
What was the console output in this case.  There must have been some sort of problem with the EclipseLink generation process such as a descriptor exception.

>   4.3. Open the persistent.xml file. 
>   4.4. Expand the Managed Classes section. The checkbox displays "Exclude
> unlisted classes (False)" and is in default selection state. 
>   4.5. Explicitly deselect the checkbox. Save the editor. <--- WORKAROUND !
>   4.6. Call again the Generate Tables from Entities... action. Now the DB table
> is generated successfully. 
> 
> The default "(False)" selection of the "Exclude unlisted classes" checkbox
> should have the same effect as it is explicitly unchecked. This is at least
> what users expect when the choose the correct radio box in step 2.6. The
> workaround at 4.5. is not very intuitive.

My tables generate fine the first time, so I am not able to reproduce this problem.  Please post the console output of the failing table generation run and hopefully we can figure out what the problem is from that.  As far as I can tell, default (false) and unchecked have the same effect.
Comment 2 Neil Hauge CLA 2011-07-01 16:24:25 EDT
Moving JPA specific bugs to new JPA component in bugzilla.
Comment 3 Karen Butzke CLA 2012-10-02 16:45:37 EDT
Closing as works-for-me until more info is provided