Hibernate notes

hibernate

    1. hibernate

    2.

crud

jdbc jdbc

orm

    1. hidernate

    2.

    3. orm object relational mapping,

      1.

      2.

hibernate

hibernate

hibernate

jar

    1. hibernate

        1.

hbm. xml

        2.

dtd,schema,

      3.

hibernate

    1.

src

hibernate. cfg. xml

    2.

      figuration PUBLIC

          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"

        " http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd ">

    3. hibernate

hibernate

hibernate

SessionFactory

SessionFactory

crud

     Hibernate

        Configuration

          1.

            Configuration cfg = new Configuration();

            cfg. configure();

            Session Factory

        Session

          session

session

            1.

            2.

            3.

            4

          session

        Transaction

          1.

              Transaction tx = session. beginTransaction();

              tx.commit();

              tx.rollback();

      1.

      2.

      3.

      4.

  hibernate

id

session

        //

          User user = new User();

          user. setUsername("

          user. setPassword("250");

          user. setAddress("

        //

          session. save(user);

      1

      1.

      2.

      3.

    hibernate

  hibernate

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>