Can we see your mappings? Also, you refer to some abstract entity1/2/3, but those statements are for Attributes and ProductAttributeValues. Which is which?
Diego On Tue, Feb 2, 2010 at 05:15, Keld Jakobsen <[email protected]> wrote: > I have a entity(Entity1) which contains a list of Entity2. Entity2 > contains a reference to Entity3. > > When im saving the list of Entity2 the systems performs a select of > Entity3 for each insert like below, how do i map my entities so they > just make a insert and dont check if the corresponding value exists ? > > -- statement #1 > SELECT attribute_.Attribute_id, > attribute_.Name as Name10_, > attribute_.AttributeType as Attribut3_10_, > attribute_.TagName as TagName10_, > attribute_.MapTo as MapTo10_ > FROM Attributes attribute_ > WHERE attribute_.Attribute_id = 'AF' /* @p0 */ > > -- statement #2 > INSERT INTO ProductAttributeValues > (Value, > Product_id, > Attribute_id) > VALUES ('Hydraulic & Mechnical' /* @p0 */, > 2 /* @p1 */, > 'AF' /* @p2 */) > select SCOPE_IDENTITY() > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
