Category: Database

  • Hibernate Error – Encountered problem trying to hydrate identifier for entity

    This is the stack trace for this error: You may get this error if the data type defined on the database table is different from the one defined in Hibernate/Java code. To fix this, make sure they are both of the same types. This can also happen when you are storing an invalid value in…

  • IntelliJ – Connect to MySQL running in Vagrant

    IntelliJ – Connect to MySQL running in Vagrant

    The Database feature of IntelliJ/PHPStorm is very powerful compared to the MySQL CLI. It allows your edit your data from the UI easily without writing any MySQL commands. Here is how you can connect your MySQL server running in a vagrant machine to the IntelliJ’s database feature and improve your productivity during development. Create a…

  • 5 Reasons MySQL Foreign Key constraints fail to create

    Finding out why Foreign key creation fail When MySQL is unable to create a Foreign Key, it throws out this generic error message: ERROR 1215 (HY000): Cannot add foreign key constraint – The most useful error message ever. Fortunately, MySQL has this useful command that can give the actual reason about why it could not…