Community
Participate
Working Groups
Sometimes the user would want to create java entity from new or already existing mapped superclass. I believe it could elegantly implemented like this: 1. When the user drags and drops a mapped superclass from the project explorer into the diagram the mapped superclass should not appear in the diagram. Instead, a new java entity, which inherits this superclass, should be created and visualized in the diagram 2. In the palette on the left, in the section 'Entities' should appear a new item named: 'Inherited Entity' or something like that. When the user chooses this item a new mapped superclass and a new entity should be created and the entity should be visualized into the diagram.
Created attachment 177502 [details] patch I am not sure about the feature name in the pallete. It should be discussed.
The patch is not cpmaptible with the current HEAD version of the JPA editor. Perhaps, something is missing in the patch ...
(In reply to comment #2) > The patch is not cpmaptible with the current HEAD version of the JPA editor. > Perhaps, something is missing in the patch ... Sorry for the misspelling: cpmaptible = compatible
Created attachment 177915 [details] Patch is updated...
Created attachment 177916 [details] Mark the first patch as invalid
I have four notes: 1. If the (already existing) mapped superclass is in another package the new entity (created with drag-and-drop) has error because it's being created without necessary import clause. 2. If the mapped superclass has already an id it seems proper default to create the new entity without id. It will be inheritted from the superclass. 3. The new palette item should have a different icon than "Java Entity". Perhaps we should use the icon for the mapped superclass (see the attachment) 4. I'd prefer shorter text for the new palette item. Perhaps "Inheritted Entity" would be fine. (This one is my fault, because we should've discuss it earlier)
Created attachment 177928 [details] Mapped superclass icon
Created attachment 177947 [details] patch This patch now implements the four notes mentioned in the previous comment.
Created attachment 177953 [details] patch This patch is modified to be compatible with the version in the head.
Patch committed