Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij database cannot create new row

Using IntelliJ 14.0.3, whenever I try to create a new row inside a database table, the editor just creates a new row with default values for each column. Then I edit those default values with actual values. After refreshing, the row then disappears. Auto-commit is on.

Edit: Also happens in IntelliJ IDEA 14.1.1 Even with Auto-Commit off, after I create the row, edit the values, then click the Commit button, it is still not saved.

like image 854
Bogdan Zurac Avatar asked Mar 12 '15 09:03

Bogdan Zurac


People also ask

How do I create a database in IntelliJ?

In the Database tool window, select a schema and navigate to File | New | Table. Alternatively, right-click the schema or database node and select New | Table. In the Create New Table dialog, specify table settings (columns, keys, indexes, foreign keys, grants). Click OK.

How do I delete a database connection in IntelliJ?

Disconnect from a database in a specified periodOn the Data Sources tab, select a data source that you want to modify. On the Options tab, select the Auto-disconnect after N seconds checkbox, where N is a number of seconds after which IntelliJ IDEA terminates the connection.

Can you delete on row in idea?

Delete a row Also, you can press Ctrl and click the necessary rows. ) on the toolbar. Alternatively, press Ctrl+Y or Delete .


1 Answers

After you filled new values in, you have to invoke 'Submit New Row' action - it's available in the inserted row's context menu.

The thing is, after you've hit 'Add New Row', the new row is only added in the UI, so that you can edit values. 'Submit New Row' action submits a new row to your dbms, 'Commit' commits current database transaction.

like image 168
Sergey A. Savenko Avatar answered Oct 25 '22 13:10

Sergey A. Savenko