Tags » Hibernate

How to resolve the Hibernate global database schema and catalog for native SQL queries

Follow @vlad_mihalcea


When your relation database system uses multiple schemas, then you can instruct Hibernate to use a global schema using the hibernate.default_schema configuration property: 500 more words



I pull the autumn
dark tight about my shoulders –
longing for some warmth.


hibernate criteria on composite id

public class TeacherStudentPK  implements java.io.Serializable{
    @JoinColumn(name = "STUDENT_ID")
	private Student student;
    @JoinColumn(name = "TEACHER_ID")
public class TeacherStudent implements java.io.Serializable {

	/* primay key*/
	private TeacherStudentPK teacherStudentPK;
… 34 more words

The best way to implement equals, hashCode, and toString with JPA and Hibernate

Follow @vlad_mihalcea

Bytecode enhancement and toString

Last week, Mark Struberg, who is an Apache Software Foundation member and OpenJPA contributor, made the following statement:

People, PLEASE do _not_ write toString() methods in…

1,161 more words


It’s supposed to get hot again today- up into the eighties or maybe the nineties. I closed up the house before I left and set the thermostat, just to be safe, but it’s difficult to wrap my mind around weather that warm when the mornings are cool and increasingly dark. 342 more words

Life In California

One to One mapping in hibernate

<hibernate-mapping package=”gar.entity”>

<class name=”RTPRequest” table=”rtp_request”>
<id name=”id” type=”long”>
<column name=”id” />
<generator class=”sequence”>
<param name=”sequence”>seq_rtp_request</param>
<param name=”allocationSize”>1</param>
<param name=”initialValue”>1</param>

<one-to-one name=”garnishment” class=”Garnishment” cascade=”all”></one-to-one> 70 more words

Perbedaan HQl dan Criteria Query Hibernate

Tutorial kali ini saya akan membahas perbedaan antara HQL dan Creteria query.

HQL (Hibernate Query Language) adalah bahasa query berorientasi object mirip dengan SQL. HQL beroperasi dengan object persisten dan berbagai peropertinya, query HQL ini akan diterjemahkan oleh hibernate dalam bentuk SQl query konvensional untuk manipulasi database. 303 more words