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 88490 - Entity Class from database wizard - not working for views
Summary: Entity Class from database wizard - not working for views
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Dongmei Cao
URL:
Keywords:
: 119930 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-02 09:25 UTC by hipoo
Modified: 2008-05-15 08:47 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
DB shema and view of entity wizard (164.41 KB, image/gif)
2006-11-02 09:38 UTC, hipoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hipoo 2006-11-02 09:25:40 UTC
When I use the wizard "Entity Class from database" - I cna't see my DB views.
There are only tables, but I must do som entity classes from some views.
Is it a bug?
Comment 1 hipoo 2006-11-02 09:38:35 UTC
Created attachment 35723 [details]
DB shema and view of entity wizard
Comment 2 Andrei Badea 2006-11-02 15:13:47 UTC
No, views are not supported in 5.5.
Comment 3 hipoo 2008-02-27 10:53:32 UTC
Too old
Comment 4 Rochelle Raccah 2008-02-27 19:57:16 UTC
So? I think it's still a valid enhancement request....
Comment 5 hipoo 2008-02-28 08:04:33 UTC
Ok, let's reopen it in current version.
But does anybody plan to make this enhancement?
I opened this issue in 2006.. long time ago.. :(
Comment 6 Andrei Badea 2008-04-07 14:57:37 UTC
*** Issue 119930 has been marked as a duplicate of this issue. ***
Comment 7 Dongmei Cao 2008-05-13 01:22:21 UTC
The problem with the views is that they do not have PKs. I think I can enhance it to generate entity classes for the
views without @Id. That means the user needs to fix the entity classes manually afterwards.
Comment 8 Dongmei Cao 2008-05-14 22:50:35 UTC
changeset:   79827:9f3540a4b1d8
Comment 9 Dongmei Cao 2008-05-14 22:54:55 UTC
With the above change/fix, entity classes will be generated for the views. But the generated entity classes will not
have @Id and equals(), hashCode() and toString() overridden. The user needs to manually fix the @Id at least.
Comment 10 Dongmei Cao 2008-05-14 23:51:30 UTC
checked in http://hg.netbeans.org/main/rev/9f3540a4b1d8. Please verify.
Comment 11 hipoo 2008-05-15 08:47:25 UTC
Fixing manually @Id, no problem :)
If you have a largre view this wizard save your time...
But of course, mayby it is posible to pickup @id candidate
in wizard? ;)