Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Passing in Primary key to entity constructor doesn't use field in INSERT SQL Statement
 

Pages: 1
Bugs & Issues
Passing in Primary key to entity constructor doesn't use field in INSERT SQL Statement
Page:1/1 

  Print all messages in this thread  
Poster Message
Dan1
User



Location:

Joined on:
20-Sep-2007 16:09:06
Posted:
41 posts
# Posted on: 17-Oct-2007 20:05:28.  
v2.5, SS, SQL Server 2000

This works and creates the proper select statement with all fields:

        Dim x As New Weld.ORM.EntityClasses.WeldSpec_DetailEntity(o.AssyID, o.PartID)
        x.PartId = o.PartID
        x.AssyId = o.AssyID
        x.Qty = o.Quantity
        x.Thickness = o.Thickness
        x.IsDirty = True
        x.IsNew = True
        x.Save()


This fails:
        Dim x As New Weld.ORM.EntityClasses.WeldSpec_DetailEntity(o.AssyID, o.PartID)
        x.Qty = o.Quantity
        x.Thickness = o.Thickness
        x.IsDirty = True
        x.IsNew = True
        x.Save()

In the second case it is not using PartId and AssyId in the insert statement (they are concatenated primary key) so I am getting an error on the save method, but you can still see I am passing in AssyID and PartID in the constructor.

  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8138 posts
# Posted on: 18-Oct-2007 08:58:58.  
Hi Dan, Could you please provide more information about the error, runtime libraries version, etc.? (http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=7717)



David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.