Bug 235384 - generate jpa entities without persistence.jar on classpath causes model problems
Summary: generate jpa entities without persistence.jar on classpath causes model problems
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Karen Butzke CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 174513
Blocks:
  Show dependency tree
 
Reported: 2008-06-03 12:20 EDT by Karen Butzke CLA
Modified: 2008-07-21 17:16 EDT (History)
1 user (show)

See Also:
neil.hauge: review+


Attachments
proposed patch - HEAD - partial fix (1.78 KB, patch)
2008-06-16 09:51 EDT, Karen Butzke CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2008-06-03 12:20:15 EDT
Create a new jpa project and don't specify an implementation library (no persistence.jar on your classpath).  Generate some entities from your database and notice all the java compile errors because the javax.persistence classes are not in your classpath.  Add the persistene.xml java to your classpath and the project now has no errors.  The project should include errors for each java file because they are not listed in the persistence.xml.

Doing a project validate or even a clean does not show these errors. If you actually open one of the java files in to the java editor and then validate it, you will get the error.  The files are not making it in to our jpa model until they are opened in the editor. You can watch this happening if you expand the JPA content  in the project explorer. As you open a java file in the editor, it will appear under your persistence unit.
Comment 1 Neil Hauge CLA 2008-06-10 16:31:12 EDT
Candidate for 2.0.1.
Comment 2 Karen Butzke CLA 2008-06-12 14:59:19 EDT
This bug is partially dependent on bug 174513.  We need to make sure a jpaProject.update() is called when the classpath changes and we also need the JpaValidator called (which is the part bug 174513 would do for us)
Comment 3 Karen Butzke CLA 2008-06-16 09:51:35 EDT
Created attachment 105021 [details]
proposed patch - HEAD - partial fix

The attached patch partially fixes this bug, it makes sure our model is appropriately updated on classpath changes.  A project validate will now show the errors.  When the blocking bug is fixed the validate will occur automatically when a classpath change occurs
Comment 4 Karen Butzke CLA 2008-07-21 17:16:55 EDT
checked in to HEAD