This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
SQL Server 2008. I have two tables Customer and CustomerInfo with OneToOne associate by key column CustomerId. CustomerId in Customer has property Is Identify = Yes and the one in CustomerInfo is No.
I have LightSpeed exception: "An error occurred when trying to assign a new Identity value to this entity. Check inner exception for details" And Inner exception: "Object cannot be cast from DBNull to other types." What's wrong? Help me please! |
|
|
What are the identity methods on the two entity types? I assume you are using IdentityColumn for Customer, but what about CustomerInfo? (Note I am asking about the identity method specified in LightSpeed -- I know the database Id column is not an identity column but that still means LightSpeed has to fill out an Id from somewhere.) Also, to be clear, I assume that Customer.CustomerId is mapped to the LightSpeed Customer.Id, but CustomerInfo.CustomerId is a foreign key, and that CustomerInfo has a primary key column of its own, which is mapped to the LightSpeed CustomerInfo.Id? (It might also be helpful if you could post the Customer and CustomerInfo entity types in case we need further info to diagnose the issue. Thanks!) |
|