Table editor in IDEA 2016.3 isn't refreshing/showing all rows correctly?

Answered

Ok Still having problems with the new table editor. Couldn't understand why after making changes in IDEA Table editor my code didn't work. It seems the Table editor isn't showing all rows, in particular it isn't refreshing correctly?

When I use mysql command line SQL interface and query the number of rows in my table I can see 128, but the IDEA Table Editor is only showing 125 and the next/previous page buttons are not enabled - the missing rows are not paged insofar as I can tell? The missing rows are changes made to the DB outside of IDEA since I started IDEA. Hitting the refresh button and clearing/resetting the filter also doesn't help.

These rows are also not in a ORM cache (or mysql shell wouldn't see them) nor is this another database. I've only made these changes in one db today/yesterday and can see the changes I made from IDEA in mysql command line queries - just not the other way around.

1
10 comments

 

Can you provide screencast, showing the steps and the problem? Still not quite understand it: when/where did you make the change which is not reflected in table editor?

Do you have Auto commit enabled? Does Refresh action help? Does closing all SQL Consoles to the DB and re-connecting to it help? 

0

This seems to occur when I've already made a change in IDEA via the Table Editor and committed it with Ctrl+Enter and left the Editor open (also auto commit was off). Then later refreshing the open Table Editor after external changes seems to stop changes appearing.

Closing and reopening the Editor seems to restore the missing rows, but I guess only so long as I make no more changes from IDEA. Having auto commit off when you make a ctrl+enter change appears to make the difference.

Would I be better off re-enabling "Submit changes immediately" instead? (revert to previous behavior?)

0

Just in case I tried clicking ctrl+refresh button - this opens another Table editor but on a completely different table (not the selected table from the database view either)? Seems pick a recently opened table instead.

0

>and committed it with Ctrl+Enter

Note that you do not actually commit, you just submit the change to the database with Ctrl+Enter action. To actually commit it press commit button. Does it help?

0

Not quite sure why I'd want a two stage commit, but OK. Doesn't really explain why IDEA isn't picking up DB changes? unless I close and reopen all Table Editors. 

Oh you mean its still showing my submitted (loose change highlights) but not committed (state not obviously indicated). Until I commit I don't get to see any changes already made to the table made externally. Even though refreshing normally losses all such pending changes?

Yeah thinking I'll turn the new stuff off - it really complicates the UX. If I want to do any big batch changes (never needed) I'd script it (or turn constraints off).

0

If you do not have Auto-Commit mode, MySQL server locks the table for entire time until you commit current transaction - so until then you won't see the changes made from other transactions.

3

I guess what I find most confusing about that is if I turn autocommit off and hit refresh it tells me it'll loose all my changes - so why doesn't it update fully?

Also if you submit, but haven't yet committed there are no indicators or warnings about losing changes - its far less obvious from this state as to whats really occurring.

0

>why doesn't it update fully?

What do you mean by "update fully"?

> it tells me it'll loose all my changes

I guess, it is because you ask it to reflect the data as it is represented in the database and having uncommitted local changes will overwrite them. Does it make sense?

 

0

> > it tells me it'll loose all my changes

> I guess, it is because you ask it to reflect the data as it is represented in the database and having uncommitted local changes will overwrite them. Does it make sense?

Not really because it asks if I want to continue and loose those changes - If I hit yes, I mean yes I want to loose the changes and see the up-to-date view of the table. If I clicked no do not continue then I'd expect it to persist.

 It seems a bit unbalanced that submitted changes do not cause data loss warnings, nor do unsubmitted changes if I close the editor instead of clicking refresh. Its not clear that what IDEA is showing you doesn't always reflect the current state of the DB. When its current and when its not.

0
Avatar
Permanently deleted user

If you have Manual transaction management and Repeatable Read isolation, your select will not be able to see any external changes imposed by other transaction until you commit your transaction(even if you're just doing selects).
So what you can do other than switching to manual mode? You can decrease isolation level to Read Committed, that should do the trick

1

Please sign in to leave a comment.