[hibernate-dev] Query generated for insert ... select

Mark Rotteveel <[email protected]> Sat, 6 Mar 2021 11:01:23 +0100
Newsgroups gmane.comp.java.hibernate.devel
Organization Me, myself and I
Message-ID <[email protected]>
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]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s