You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Tedman Leung <te...@sfu.ca> on 2007/11/12 07:39:48 UTC

native queries are select only?

So I read the previous explanation which says 

"Native queries can only be SELECT statements per the spec; OpenJPA
assumes that if they don't start with SELECT, they're stored
procedures. That's what's causing the error."

Could some one let me know what page of the spec says that? cuz I 
downloaded the ejb-3_0-fr-spec-persistence.pdf and tried to look for it 
but I couldn't find it.

To further confuse me more, the j2ee 1.5 javadoc api for 
javax.persistence.EntityManager says :

"Query createNativeQuery(String sqlString)
Create an instance of Query for executing a native SQL statement, e.g., 
for update or delete."

Maybe some one should tell the SUN guys to remove the "update or delete" 
part if it's in the spec.

anyone got any details on this?

 -- 
                                                           Ted Leung
                                                           tedman@sfu.ca