question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Boolean not updating after passing it to the update statement

See original GitHub issue

Hi,

I’m trying to update some values in my class “Member” by passing my object to the update statement like below. Some values are of type int, string, bool,… All values are updating correctly, but not the bool value. There is no error during the commit and I checked the values before update. They are all correct. Any idea what’s going wrong here? Am I missing something?

Member m = new Member();
m.Id = 1;
m.IsActive = false;
...

db.BeginTransaction();
db.Update(m);
db.CommitTransaction();

Kind regards

Environment details

linq2db version: 2.6.1 Database Provider: MS Access Operating system: Windows 10 Framework version: .NET Framework 4.6.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MaceWinducommented, Dec 23, 2018

Now it is sounds like a bug and I actually can reproduce it. As workaround, add following code to your T4 template after LoadAccessMetadata call but before GenerateModel call:

	foreach (var table in Tables.Values)
		foreach (var column in table.Columns.Values)
		{
			if (column.BuildType() == "bool")
				column.IsIdentity = false;
		}
0reactions
Jyasancommented, Dec 23, 2018

Thanks for the advice & support !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Boolean not updating it's value when updated in a function
What I am trying to achieve is to update the boolean value which is passed as a parameter. For instance where i=1 I...
Read more >
Not able to set update a module entry with a Boolean ...
I am just not able to figure out how to update the value. In "Update module entry" the variable is displayed as text,...
Read more >
Bool Value not updating when changed - Scripting Support
My issue is that when I play the game it works fine, however when I try to update the value (either by going...
Read more >
How to update boolean value of a variable inside if statements?
Hey! Basically, what I am trying to do is update a boolean variable inside an if statement. What I'm currently doing is the...
Read more >
Update By Query API | Elasticsearch Guide [8.9]
When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found