Example & Tutorial understanding programming in easy ways.

Hibernate object states

Hibernate is a full object/relational mapping solution that not only shields the developer from the details of the underlying database management system, but also offers state management of objects.

Read More →

Making objects persistent

We can make a transient instance persistent by associating it with a session

Read More →

Loading an object

The load() methods of Session provide a way of retrieving a persistent instance if you know its identifier. load() takes a class object

Read More →

Querying in Hibernate

SQL of your database, with optional support from Hibernate for result set conversion into objects.

Read More →

Executing queries in Hibernate

In Hibernate we can obtain a Query using the current Session.

Read More →

Iterating results in Hibernate

If they are not already cached, iterate() will be slower than list() and might require many database

Read More →

Queries that return tuples in Hibernate

Hibernate queries sometimes return tuples of objects

Read More →

Scalar results in Hibernate

Here we can even call SQL aggregate functions. Properties

Read More →

We can Bind parameters in Hibernate

The advantages of named parameters are as follows:

Read More →

Pagination in Hibernate

The maximum number of rows you want to retrieve and/or the first row you want to retrieve,

Read More →

Scrollable iteration in Hibernate

The Query interface can be used to obtain a ScrollableResults object that allows flexible navigation of the query results.

Read More →

Externalizing named queries uses in Hibernate

if any query contains characters that could be interpreted as markup.

Read More →

Filtering collections in Hibernate

The query string can refer to this, meaning the current collection element.

Read More →

Criteria Queries in Hibernate

developers prefer to build queries dynamically using an object-

Read More →

Queries in native SQL

Whenever we choose the use of the Hibernate API, you must enclose SQL aliases in braces.

Read More →

Modifying persistent objects in Hibernate

There is no need to call a particular method (like update(), which has a different purpose) to make your modifications persistent.

Read More →

Modifying detached objects

Applications that use this kind of approach in a high-concurrency environment usually use

Read More →

Automatic state detection

The usage and semantics of saveOrUpdate() seems to be confusing for new users.

Read More →

Deleting persistent objects in Hibernate

delete objects in any order, without risk of foreign key constraint violations.

Read More →

Replicating object between two different datastores in Hibernate

The ReplicationMode determines how replicate() will deal with conflicts with existing rows in the database

Read More →

Flushing the Session in Hibernate

Except when you explicitly flush(), there are absolutely no guarantees about when the Session

Read More →

Transitive persistence in Hibernate

This works for operations such as the removal of a child from the collection.

Read More →

Using metadata in Hibernate

Hibernate exposes metadata via the ClassMetadata and CollectionMetadata

Read More →

Flush the persistence context

Flush occurs by default (this is Hibernate specific and not defined by the specification)

Read More →

Locking in Hibernate

Hibernate offers more native cascading options,

Read More →

Checking the state of an object

You can also check whether an object

Read More →

Native Hibernate API

Native Hibernate API

Read More →
,Hibernate object states,Making objects persistent,Loading an object,Querying in Hibernate,Executing queries in Hibernate,Iterating results in Hibernate,Queries that return tuples in Hibernate,Scalar results in Hibernate,We can Bind parameters in Hibernate,Pagination in Hibernate,Scrollable iteration in Hibernate,Externalizing named queries uses in Hibernate,Filtering collections in Hibernate,Criteria Queries in Hibernate,Queries in native SQL,Modifying persistent objects in Hibernate,Modifying detached objects,Automatic state detection,Deleting persistent objects in Hibernate,Replicating object between two different datastores in Hibernate,Flushing the Session in Hibernate,Transitive persistence in Hibernate,Using metadata in Hibernate,Flush the persistence context,Locking in Hibernate,Checking the state of an object,Native Hibernate API