Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329817 - Registering of java entities in peristence.xml causes silent replacement of objects
Summary: Registering of java entities in peristence.xml causes silent replacement of o...
Status: CLOSED DUPLICATE of bug 257530
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: Framework (show other bugs)
Version: 2.3.1   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: dali.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-09 10:36 EST by Stefan Dimov CLA
Modified: 2010-11-10 03:44 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Dimov CLA 2010-11-09 10:36:47 EST
Steps to reproduce:
    1. Import the last version of JPA Editor plugin from HEAD as a project
    2. Open a runtime Eclipse IDE in debug mode
    3. Create new JPA 1.0 project (in the runtime IDE) and make sure that the option "Annotated classes must be listed in persistence.xml"
    4. Go to target IDE and put two breakpoints in java files:
        a) org.eclipse.jpt.ui.diagrameditor.util.JPASolver [line: 520]
        b) org.eclipse.jpt.ui.diagrameditor.util.JPASolver [line: 1004] 
    5. Put a condition on both breakpoints:
         jpt.getName().endsWith("Mark")
    6. Open diagram of the JPA Project
    7. Create a new entity from the palette in the diagram
    8. Use direct editing and rename the new entity as 'Mark'
    9. The debugger will suspend execution a few times at the breakpoints. Notice the debug id of the object referenced by 'jpt' variable. Resume debugging with F8
   10. Use the context button of the entity 'Mark' to create a new attribute
   11. The debugger will stop a few times at the breakpoints. 

Result: Notice that the debug id of the 'jpt' object is already changed, hence this is another object.

This happens only if the java classes are being listed in persistence.xml and it causes a lot of errors in the diagram editor, because in the editor the grahical objects are mapped to the java persistence objects.
Comment 1 Stefan Dimov CLA 2010-11-10 03:44:19 EST

*** This bug has been marked as a duplicate of bug 257530 ***