toplink prefixes table with TL_ while update operation

Posted by Dewfy on Stack Overflow See other posts from Stack Overflow or by Dewfy
Published on 2011-01-10T14:51:37Z Indexed on 2011/01/10 14:53 UTC
Read the original article Hit count: 261

Filed under:
|

I have very simple named query on JPA (toplink ):

UPDATE Server s SET s.isECM = 0

I don't carry about cache or validity of already preloaded entities. But database connection is performed from restricted account (only INSERT/UPDATE/DELETE). It is appeared that toplink on this query executes (and failed since TL_Server is not exists) very strange SQL:

INSERT INTO TL_Server (elementId, IsECM) 
    SELECT t0.ElementId, ? 
    FROM Element t0, Server t1 
    WHERE ((t1.elementId = t0.ElementId) AND (t0.elementType = ?))

bind => [0, Server]

What is this? How the simple UPDATE appears an INSERT? Why toplink queries TL_?

© Stack Overflow or respective owner

Related posts about jpa

Related posts about toplink