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 247255

Summary: Provide SQL support inside <query> elements in JPA mapping files (orm.xml)
Product: javaee Reporter: terje7601
Component: PersistenceAssignee: Sergey Petrov <sj-nb>
Status: REOPENED ---    
Severity: normal    
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

Description terje7601 2014-09-18 08:03:24 UTC
It would be great if NetBeans would provide SQL support inside <query> elements in JPA mapping files (orm.xml), just as if the query was defined in a .sql file (syntax coloring, parsing & validation, ability to run statements, ...).
Ideally, there would also be a "Connection" bar to choose the connection, which should also include the connection from the persistence.xml file (if specified, by using the javax.persistence.jdbc.* properties).

A simplified fragment of an orm.xml file with an SQL query inside:

        <query>select id from employee where active = 1</query>
Comment 1 Martin Balin 2016-07-07 08:53:31 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 2 terje7601 2016-11-07 10:36:42 UTC
Still relevant.