Replies: 3 comments 4 replies
-
Did you enable refresh in the db?
Georgios
…On Thu, 30 Nov 2023 at 11:16, mic2zar ***@***.***> wrote:
I have watched "Using RavenDB as a Queuing Infrastructure" from Oren and
trying to (re)implement his idea for defer processing using @referesh flag
in the metadata.
What is not working for me is the update of @refresh
<https://github.com/refresh> flag. While it is getting saved when the
entity is getting created (Command in the example), it is not getting
refreshed when object already exists and is *attached* to the session.
How shall I communicate to the _dbSession that one of entities attached
shall be resaved after metadata update.
public async Task AddOrUpdateAsync(Command command, DateTime refresh)
{
ArgumentNullException.ThrowIfNull(command);
var existingCommand = await _dbSession.TryLoadCommandAsync(command);
if (existingCommand != null)
{
/// following line is not working ///
***@***.***"] = refresh;
}
else
{
await _dbSession.StoreAsync(command);
***@***.***"] = refresh;
}
}
Even if I add SaveChangesAsync (which I should not because saving happens
automatically for all our other objects on exist), the @refresh
<https://github.com/refresh> flag is not getting updated:
if (existingCommand != null)
{
***@***.***"] = refresh;
await _dbSession.SaveChangesAsync();
}
—
Reply to this email directly, view it on GitHub
<#17784>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMYG5W6GXYWFW32LWSXMD3YHBFIDAVCNFSM6AAAAABAA2YTT6VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZVHEYDQNZUGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Please can you make a failing test. Did you perhaps disable tracking session wide? |
Beta Was this translation helpful? Give feedback.
-
We investigated issue further and apparently |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have watched "Using RavenDB as a Queuing Infrastructure" from Oren and I am trying to (re)implement his idea for defer processing using @referesh flag in the metadata.
What is not working for me is the update of @refresh flag. While it is getting saved when the entity is getting created (Command in the example), it is not getting refreshed when object already exists and is attached to the session. How shall I communicate to the _dbSession that one of entities attached shall be resaved after metadata update.
Even if I add SaveChangesAsync (which I should not because saving happens automatically for all our other objects on exist), the @refresh flag is not getting updated:
Beta Was this translation helpful? Give feedback.
All reactions