This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 52617 - Disable 'delete' for findByPrimaryKey method
Summary: Disable 'delete' for findByPrimaryKey method
Status: CLOSED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Martin Grebac
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2004-12-17 15:47 UTC by Petr Blaha
Modified: 2006-03-24 12:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
This patch disables Delete action for method with name "findByPrimaryKey" and with one "String" parameter. I cannot find ui spec regarding this. Please confirm, that this patch is sufficient. (1.12 KB, patch)
2005-02-22 09:50 UTC, Jan Becicka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Blaha 2004-12-17 15:47:24 UTC
[Build 20041216]
According to the EJB 2.1 specification, see.
10.6.10  the remote home interface must always
include findByPrimaryKey method. I suggest to
disable delete this method in entity bean's
logical view.
Comment 1 Jan Becicka 2005-02-22 09:50:06 UTC
Created attachment 20449 [details]
This patch disables Delete action for method with name "findByPrimaryKey" and with one "String" parameter. I cannot find ui spec regarding this. Please confirm, that this patch is sufficient.
Comment 2 Martin Grebac 2005-02-22 13:31:51 UTC
Actually, the findByPrimaryKey method may get different parameters
than String (String generated as a default is not very lucky, too, but
that's a different story). 
 I think the fix could be enhanced in two ways
- remove parameter check
- check if the node corresponds to ENTITY bean (see javax.ejb.EntityBean)
Comment 3 Jan Becicka 2005-02-23 08:32:01 UTC
Checking in MethodNode.java;
/cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/nodes/MethodNode.java,v
 <--  MethodNode.java
new revision: 1.7; previous revision: 1.6
done
Comment 4 Petr Blaha 2005-03-21 13:28:33 UTC
[Build 20050320]