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 93353 - Entity Beans and JSF pages needs to be created for join tables.
Summary: Entity Beans and JSF pages needs to be created for join tables.
Status: RESOLVED INVALID
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-26 22:59 UTC by pcmreddy
Modified: 2007-10-25 14:07 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 pcmreddy 2007-01-26 22:59:37 UTC
NB 5.5 + JDK 1.5.0_10 on XP.

Consider the the following use cases:

CREATE TABLE DOCS_TBL (
   doc_id integer  primary key,
   doc_isconfidencial  smallint,     /*0=no , 1=yes*/
   doc_title varchar(250),
   doc_author varchar(250),
   doc_url varchar(255),
   doc_format varchar(10),
   doc_pagescount smallint
);

CREATE TABLE USER_TBL (
   user_id integer primary key,
   user_name varchar(50),
   user_isactive smallint,          /*0=no, 1=yes*/
   user_quota    integer
);


Case 1: IDE detects this table as join table and does not generate JPA classes
for this table.

CREATE TABLE USER_DOCS_TBL (
   user_id integer references USER_TBL(user_id),
   doc_id integer references DOCS_TBL(doc_id),
   constraint uesr_doc_id primary key(user_id, doc_id)
);


Case 2 :  No Beans or JSF pages are generated for the following schema.

CREATE TABLE USER_DOCS_TBL (
   user_id integer references USER_TBL(user_id) not null,
   doc_id integer references DOCS_TBL(doc_id) not null
) 


IDE should not leave behind this type of cases.
It should generate JPA classes and JSF pages for this cases too.
Comment 1 Andrei Badea 2007-02-15 16:56:51 UTC
Sorry, I don't understand the issue. Case 1 is handled that way intentionally --
no entity class should be generated for join tables, a many-to-many relationship
is generated instead. The table in case 2 still looks like a join table to me
(even without the primary key), so it should be handled the same way.
Comment 2 Andrei Badea 2007-10-25 14:07:49 UTC
Closing per desc2.