Login
Forgot your password?
JavaMad logo
Popular Questions
Hibernate Interview Questions
 
previous12next
what are the hibernate relationships ?how it connect to mapping file?

October 18 2012
 
There are one-to-one, one-to-many, many-to-one and many-to-many relationship in hibernate.

For one-to many relationship, you can mention like below in mapping file-

from single mapping side-
<one-to-many class="ClassNameOfManyRelation"/>

from multiple mapping side-
<many-to-one name="single" class="SingleClassName" fetch="select"
           <column name="ID" no-null="true"/>
</many-to-one>


October 18 2012
 
Explain different inheritance mapping models in Hibernate.

May 07 2012
 
How to use Annotations with Hibernate?

May 07 2012
 
In Hibernate we are using Hibernate Hirachey concept there are three types 1)class for sub class 2) concret class which one better one please give the one seinory.

May 04 2012
 
what is the difference between first level-cache and second-level cache in Hibernate?

April 07 2012
 
first level cache is implemented by default but the second level cache is for customization,,,like if in your application u hav some data which will shown to all user eg u have an js file which consist some city name so u can put it into cache so whwn ur application start this data will automatically loaoded

April 07 2012
 
String hql = "update Supplier set name = :newName where name = :name";
Query query = (Query)session.createQuery(hql);
query.setString("name","Supplier Name 1");

int rowCount = query.executeUpdate();

I am using this query to update in hibernate an also using eclipse id,but it shows compile time error on this method executeUpdate() says it may be executeUpate()

December 17 2011
 
HI I have resolved my problem,
I just replace my hibernate.jar with other one and it work for me.

December 17 2011
 
If 100 employees are there I want first 50 emp records how to retrieve through Hibernate write code?

October 24 2011
 
Criteria crite = session.createCriteria(ClassName.class);
crite.setFirstResult(0);
crite.setMaxResults(50);
List list = (List)crite.list();

October 24 2011
 
If 100 emp are there how to retrieve some same salary emp records through hibernate write query for that?

October 24 2011
 
Criteria crite = session.createCriteria(ClassName.class);
crite.add(Restrictions.eq("columnName",Salary);
List list = (List)crite.list();

Ex:

crite.add(Restrictions.eq("EmpSalary",2000);


October 24 2011
 
How to modify Date of birth in database through hibernate plz write code ?

October 24 2011
 
How to configure multiple databases in hibernate?plz write sample code?

October 24 2011
 
Tack multiple Configuration file with different database properties and use it in application..

October 24 2011
 
Plz write code for 1- n association and n-1 associations?

October 24 2011
 
Explain drawbacks of Hibernate

September 21 2011
 
Drawbacks of Hibernate

September 20 2011
 
what is hibernet,struts and spring?why these required actually what is these?

September 03 2011
 
Hibernate is orm tool to Manage the persistance logic.

Through struts we can develop only web
application


But through Spring we can develop all java / J2ee application


September 03 2011
 
I am using Struts2,Hibernte 3.3,Display 1.2 in our application.

When we fetching data thorugh hibernate and display data in jsp page using display tag then he retreive data randomly.

Randomly means sometime give old data and sometime give new data. It's not fix what will come result.

Actually Problem is , when we display data in jsp page and user update the record through jsp page and user must show updated record but it's not come properly sometime show old record and new record

September 02 2011
 
previous12next
Ads