Bug 202741 - Code completion for table names fails silently if database connection not registered
Code completion for table names fails silently if database connection not reg...
Status: NEW
Product: javaee
Classification: Unclassified
Component: Persistence
7.1
All All
: P3 (vote)
: 7.2
Assigned To: Sergey Petrov
issues@javaee
: USABILITY
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-27 15:21 UTC by Petr Jiricka
Modified: 2011-10-27 11:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2011-09-27 15:21:53 UTC
1. Create a Java EE 6 Web application 
2. Register some database connection under Services
3. Create entities from this database
4. Close the project
5. Remove the connection in Services
6. Reopen the project - you will notice that the project will be correctly badged with an exclamation mark to indicate broken datasource
7. Open the generated entity class and press Ctrl+Space after @Table(name = "

Table names should be offered, but the IDE just says "No suggestions". The IDE should offer a way to address the situation, e.g. by fixing the broken datasource.

A similar situation may happen when opening an existing project, and not alerting the user may create a discoverability problem of the database code completion feature.
Comment 1 Sergey Petrov 2011-09-30 11:08:24 UTC
as it's said in 202742 correct badge is jee.common/web.project functionality, but there may be some api to check if datasource is valid(and also to fix later) from persistence side, need to use in code completion if available or consider to add.
Comment 2 Sergey Petrov 2011-10-27 11:50:43 UTC
one more issue is to suggest db connection creation for j2se project


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo