Summary: | [DOM] AssertionFailedException when setting both FetchType and CascadeType in JPA Details view | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Reto Urfer <reto.urfer> | ||||||
Component: | Core | Assignee: | David Audel <david_audel> | ||||||
Status: | VERIFIED DUPLICATE | QA Contact: | |||||||
Severity: | major | ||||||||
Priority: | P3 | CC: | david_audel, jerome_lanneluc, karenfbutzke, Olivier_Thomann | ||||||
Version: | 3.4 | ||||||||
Target Milestone: | 3.5 M2 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Reto Urfer
2008-07-20 03:45:50 EDT
The same prolem can also be reproduced with setting the optional flag to a non-default value and either setting the FetchType or CascadeType. It seems that as soon as one annotation attribute has been set no second attribute can be set anymore in the same annotation. With a simple use case I am not able to reproduce this. Could you attach an entire file that shows this issue? It seems like a strange one, and not one others have reported. Created attachment 107885 [details]
Project I could reproduce the problem with
as javax.persistence provider I used ejb3-persistence.jar from Hibernate Annotations 3.3
Hi, could you try opening this project in a new clean workspace? I am still unable to reproduce this problem. It really appears that it is a JDT bug(since the exception occurs in JDT code) and maybe there is some preference you have set that is causing the problem. You were right. With a new workspace everything works fine. I also found the problem and could fix all my other workspaces. It was a code formatting template i once created with Eclipse 3.3. As soon as i activated it, the exceptions apeared. After i have recreated this formatter based on an Eclipse 3.4 built-in formatter i had no problems anymore. This also solved the problems i reported with Bug# 241472!!! Thanks for help Glad to hear you fixed the problem, closing this bug I run again into the same problem. It happens, if in a Java formatter definition on the 'New Llines' tab in the section 'Insert new line' the toggle 'in empty class body' is NOT checked. As soon as i check this button, everything is working fine. All the other check buttons do not seem to have any influence on the behaviour of the JPA Details view. Reassigning to JDT, will attach a test project that shows the problem. If you are inserting annotation values in source, setting the JDT preference FORMATTER_INSERT_NEW_LINE_IN_EMPTY_TYPE_DECLARATION to false causes the annotation value pair not to be inserted. In my test project I start with a field with the annotation @Basic(fetch=FetchType.EAGER). I am trying to add the member value pair optional=true. The exception shown in comment #1 is hit and the member value pair is not added. Created attachment 110265 [details]
test project - one failing test
Reproduced. I'll investigate. David, The bug might actually come from the code formatter that returns too many edits. *** This bug has been marked as a duplicate of bug 234583 *** Verified for 3.5M2 using I20080914-2000 and test project from comment 9 |