Hello,
I'm having trouble while saving an entity. For, some reasons, the INSERT query being generated only contains the foriegn key values. Here's an example of my code:
OrderEntity order = new OrderEntity();
order.Paid = true;
order.Subtotal = 25.36;
order.BuyerID = 25;
(several other values being set)
DataAccessAdapter adapter = new DataAccessAdapter();
adapter.SaveEntity(order, true, true);
This throws an error because the Subtotal field is not part of the INSERT query and it is not a nullable field. There are several other fields that are not part of the query. Here is the query that I obtained from the QueryExecuted property of the exception:
INSERT INTO [WIACAM].[dbo].[Order] ([SellerID], [StoreID], [BuyerID], [BillingInformationID], [ShippingContactInformationID], [SalesChannelID], [InstanceID]) VALUES (@SellerID, @StoreID, @BuyerID, @BillingInformationID, @ShipAddressID, @SalesChannelID, @InstanceID)
You'll notice that only ID (foreign key) fields are included in the query. There are several other non-foreign key values that should be a part of this query. Has anyone else seen this problem? What am I doing wrong? I haven't had this issue with any of my other entities.
Thanks,
Jason Hodges