Reputation: 83
I am using ORMLite in my project.
What is the best way in ORMLite to perform UPSERT? Is there any built-in functions to do this type of operations?
Thanks rudrvij
Upvotes: 2
Views: 620
Reputation: 143319
There's currently no API that uses the native upsert feature in the underlying RDBMS but OrmLite's db.Save()
API will insert a record if it doesn't exist or update it if it does.
You can request for OrmLite to natively support upserts by submitting a feature request on ServiceStack's UserVoice.
Upvotes: 2