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 - Provide SQL support inside <query> elements in JPA mapping files (orm.xml)
Summary: Provide SQL support inside <query> elements in JPA mapping files (orm.xml)
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Sergey Petrov
Depends on:
Reported: 2014-09-18 08:03 UTC by terje7601
Modified: 2016-11-07 10:36 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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.