Skip to content

Curd console application for sample data base (auto mapping/seeding) w/ java nd hibernate

Notifications You must be signed in to change notification settings

gabchx/mysql-curd-hibernate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hibernate CURD terminal application

Using this code, you'll be able to use JDBC and Hibernate to integrates a PC Bang chain database.

Get started

  1. Pull the code
  2. Open with in IntelliJ
  3. Adjust the secrets
    • Go to src/main/java/src/GlobalVariables and adjust it

      public static int port = **YOUR PORT**;
      public static String host = **YOUR HOST**;
      public static String db_name = **YOUR DATABASE NAME**;
      public static String username = **YOUR USERNAME**;
      public static String password = **YOUR PASSWORD**;

    • Go to src/main/java/ressources/hibernate.cfg.xml and adjust it
      <property name="connection.url">**YOUR URL**</property>
      <property name="hibernate.connection.username">**YOUR USERNAME**</property>
      <property name="hibernate.connection.password">**YOUR PASSWORD**</property>

  4. Run the code all is done ---

Note

Please note that adding and update feature in the terminal application is only write for customer instance. For adding, and remouving action to work in my-sql please set foreign key check to false :

SET GLOBAL FOREIGN_KEY_CHECKS=0;

Database schema

enter image description here

About

Curd console application for sample data base (auto mapping/seeding) w/ java nd hibernate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages