I’m currently working on a MVC project using Couchbase and noticed an odd behaviour when I do an insert then redirect to the list page. The insert is successful so it continue to show a list of created items but I’m not sure if it’s running to fast that it misses the lastest entry. If I do a manual refresh after the page is loaded the new entry is populated.
I have tried the following suggestion from the team on the irc channel with no success.
Here is the insert command
string documentID = string.Format("{0}.config", Guid.NewGuid());
var document = new Document<dynamic>
{
Id = documentID,
Content = configuration
};
var result = bucket.Upsert(document);
if (result.Success)
{
success = 0;
}
Here is the Select command:
string query = "SELECT meta(`default`).id as id, name, description, dateCreated FROM `default`;"
var queryRequest = new QueryRequest().Statement(query).ScanConsistency(ScanConsistency.RequestPlus);
I have also tried
var queryRequest = new QueryRequest().Statement(query).ScanWait(new TimeSpan(0,0,20));
Also I’m trying the couchlabs Identity code and when I try to use a Role when the controller is looking for that Role it forgets about couchbase and looks for an SQL connection. Is this due to the code being in labs and not ready for a production environment?