[hibernate-dev] Re: Query generated for insert ... select
Mark Rotteveel <[email protected]> Sat, 6 Mar 2021 12:34:34 +0100
| Newsgroups | gmane.comp.java.hibernate.devel |
|---|---|
| Organization | Me, myself and I |
| Message-ID | <[email protected]> |
Good to know, thanks. I'll also talk to the Firebird core developers to address the problems Firebird has with certain parenthesized select fragments (<qurey expression body> compared to the SQL standard. Mark On 06-03-2021 12:23, Christian Beikov wrote: > That's a bug. It should be a root. I'll fix that on Monday. > > Mark Rotteveel <[email protected] <mailto:[email protected]>> > schrieb am Sa., 6. März 2021, 11:01: > > For an INSERT ... SELECT, Hibernate (in wip/6.0) will generate a SQL > statement with parentheses around the select statement. > > This happens in AbstractSqlAstTranslator.visitQuerySpec(QuerySpec > querySpec) because the querySpec is not a root. Firebird doesn't > support > a parenthesized select in insert (yet). > > What would be the best way to address this in the AstTranslator or > elsewhere? Overriding the entire visitQuerySpec(QuerySpec querySpec) > method could be brittle as significant changes would need to be > replicated to the Firebird-specific translator, and this only really > applies when processing a select in an insert statement (I think; there > are some other places where Firebird doesn't support parenthesized > selects where the standard does). > > Mark > -- > Mark Rotteveel > _______________________________________________ > hibernate-dev mailing list -- [email protected] > <mailto:[email protected]> > To unsubscribe send an email to [email protected] > <mailto:[email protected]> > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s > -- Mark Rotteveel _______________________________________________ hibernate-dev mailing list -- [email protected] To unsubscribe send an email to [email protected] %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s