Passing in Primary key to entity constructor doesn't use field in INSERT SQL Statement

Posts   
 
    
Dan1
User
Posts: 41
Joined: 20-Sep-2007
# 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.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# 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 Support Team