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 74549 - Warn when user tries to create a POJO with same name in diff package
Summary: Warn when user tries to create a POJO with same name in diff package
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Dongmei Cao
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-06 23:57 UTC by Rochelle Raccah
Modified: 2009-11-02 11:17 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rochelle Raccah 2006-04-06 23:57:45 UTC
From a discussion with Andrei and Pavel:
>However, I am able to create a class with the same name in a different 
> package from a same name table in a different schema.

Re. creating a class with the name name in a different package, I still 
think the wizard should display a warning, not an error. Makes sense for 
e.g. a project with no persistence units, which will be used as a 
library in another project. The second project's persistence.xml could 
e.g. put the two packages in two different persistence units.
==============
Some more info: It is an error to have these 2 classes in the same persistence
unit since we accept the default name for the @Entity annotation.
Comment 1 Rochelle Raccah 2006-04-07 00:00:50 UTC
I should clarify - this is using the Entity from DB wizard twice on 2 diff
dbschemas, each with a table named MYTABLE.
Comment 2 Pavel Buzek 2006-07-31 04:02:56 UTC
OK, so I understand that we need to display an error. It is not a very common
use case that the user would have 2 schemas with the same table and try to
generate classes for both in the same module. Workaround it obvious. Possible to
fix in 5.5, but IMHO P4.
Comment 3 Jiri Prox 2007-09-17 20:33:11 UTC
Obsolete milestone, please reevaluate
Comment 4 Dongmei Cao 2008-11-19 20:16:56 UTC
Low priority bug.
Comment 5 Quality Engineering 2009-11-02 11:17:08 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX