Hi ,
We are trying to execute a query like this
UPDATE [OptimaTigerDB].[Security].[UserPreference] SET [userPreference]='True'
WHERE ( [OptimaTigerDB].[Security].[UserPreference].[userId] = 164 AND
[OptimaTigerDB].[Security].[UserPreference].[preferenceId] = 1))
We are using the LLBLGen 2.5 and adapter method.
Calling SaveEntity(EntityName, refetchAfterSave, updateRestriction, recurse) method.
We are passing refetchAfterSave=false, recurse = true and setting the predicate with userid and preference fields. We want to update all the rows with the matching conditions.No primary key used to update.While we try to run getting the following query
UPDATE [OptimaTigerDB].[Security].[UserPreference] SET [userPreference]='True'
WHERE ( ( [OptimaTigerDB].[Security].[UserPreference].[id] IS NULL) AND
( [OptimaTigerDB].[Security].[UserPreference].[userId] = 164 AND
[OptimaTigerDB].[Security].[UserPreference].[preferenceId] = 1))
Please let us know why runtime is checking the primary key field to is null and also we are getting the following error
"During a save action an entity's update action failed. The entity which failed is enclosed"
Help is very much appreciated.
Regards
Prabhu