Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dali-dev] Persistence unit is not updated properly after renaming entity

Thanks Brian,

 

I will take a look at the issues you’ve found. According the rename refactoring participation, it is already addressed in the following bug 324026.

 

Regards,

Petya

 

From: dali-dev-bounces@xxxxxxxxxxx [mailto:dali-dev-bounces@xxxxxxxxxxx] On Behalf Of Brian Vosburgh
Sent: Tuesday, March 12, 2013 12:15 AM
To: General Dali EJB ORM developer discussion.
Subject: Re: [dali-dev] Persistence unit is not updated properly after renaming entity

 

Petya:

I have fixed this problem and pushed my changes.

I tested the change by renaming a type via the diagram editor etc. My fix seems to
work OK; but I ran into a couple of issues:

- I encountered a deadlock during a refactor. The thread dump is attached.

- The refactoring seems to ignore the settings I pick in the dialog. (e.g. If I do not
click the "Update similarly named variables and methods" check box; the variables
and methods are still changed.) Maybe this is because the feature is still under
construction?

I also have an observation: The diagram editor should explicitly participate in the refactoring,
not try to "participate" in the background. That is, you should be extending the
extension point "org.eclipse.ltk.core.refactoring.renameParticipants" and adding any diagram
editor changes to the list of potential refactoring changes that are presented to the
user. Then you would also be notified when the changes are applied. It might make
your code much more simple?

Regards,
Brian

On 3/7/2013 9:36 AM, Sabeva, Petya wrote:

Hi all,

 

After I rebased my changes today, on top of the master branch, I’ve notice that when I have an entity and rename it, the corresponding persistent type in the persistence unit is not updated properly. What exactly is happening is that the classRef refers to a class with the new name, but if I call classRef.getJavaManagedType() -> it returns the old persistent type (a JPT object with old name). This leads to NPE when I try to manipulate an object, which is returned by persistenceUnit.getPersistentType(newName) and thus it prevents me to rename a persistent type in the JPA diagram editor. I guess this is caused by the huge refactoring from these days… However I am interested in, whether it is working on this issue, or should I open a bug?

 

Regards,

Petya




_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev

 


Back to the top