Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Insert into Select Problem
PostPosted: Wed Nov 13, 2013 7:10 am 
Newbie

Joined: Wed Nov 13, 2013 7:05 am
Posts: 2
Hi,

ich habe ein Problem mit einer Insert into .. Select query mit einer embeddedId.

Folgende Query funktioniert:

Code:
String hql = "Select id.structureId, id.productId from ProductStructureXref ";


Bei der Query die ich eigentlich möchte:
Code:
String hql = "Insert into ProductStructureXref (id.structureId, id.productId) Select xref.id.structureId"
                    + ", xref.id.productId from ProductStructureXref xref where id.structureId = " + oldId;


Erhalte ich jedoch folgend Exception:
Quote:
org.hibernate.QueryException: could not resolve property: of: com.ids.dam.cat.entity.ProductStructureXref [Insert into ProductStructureXref (id.structureId, id.productId) Select xref.id.structureId, xref.id.productId from com.ids.dam.cat.entity.ProductStructureXref xref where id.structureId = 350]
at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:83)


Ich hoffe mir kann jemand weiterhelfen?

Danke Simone


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.