Category Archives: Hibernate

Spring Liquibase – DB Creation/Changes

Steps to Configure Spring Liquibase – Dependency – pom.xml – In ApplicationContext.xml Create bean of SpringLiquibase – db-changelog.xml – We have to place sql files in project for above mentioned location(path attribute) Advertisements

Posted in Hibernate, Liquibase, Spring | Tagged , , , , | Leave a comment

Hibernate Session Object Method brief

save -Persist the given transient instance, first assigning a generated identifier. (Or using the current value of the identifier property if the assigned generator is used.) merge -Copy the state of the given object onto the persistent object with the … Continue reading

Posted in Hibernate | Leave a comment

Understanding Propagation value for @Transactional in Spring

MANDATORY Support a current transaction, throw an exception if none exists. NESTED Execute within a nested transaction if a current transaction exists, behave like PROPAGATION_REQUIRED else. NEVER Execute non-transactionally, throw an exception if a transaction exists. NOT_SUPPORTED Execute non-transactionally, suspend … Continue reading

Posted in Hibernate, Spring | Leave a comment

Hibernate Inheritance: Table Per Concrete Class

Output : Hibernate: insert into PERSON (FIRSTNAME, LASTNAME, PERSON_ID) values (?, ?, ?) Hibernate: insert into EMPLOYEE (FIRSTNAME, LASTNAME, department_name, joining_date, PERSON_ID) values (?, ?, ?, ?, ?) Hibernate: insert into OWNER (FIRSTNAME, LASTNAME, partnership_stake, stocks, PERSON_ID) values (?, ?, … Continue reading

Posted in Hibernate | Leave a comment

Hibernate Inheritance: Table Per Subclass

Output : Hibernate: insert into PERSON (firstname, lastname) values (?, ?) Hibernate: insert into PERSON (firstname, lastname) values (?, ?) Hibernate: insert into Employee (department_name, joining_date, person_id) values (?, ?, ?) Hibernate: insert into PERSON (firstname, lastname) values (?, ?) … Continue reading

Posted in Hibernate | Leave a comment

Hibernate Inheritance: Table Per Class Hierarchy

* class Person – firstname – lastname * class Employee – joining_date – department_name Output : Hibernate: insert into EMPLOYEE (FIRSTNAME, LASTNAME, discriminator) values (?, ?, ‘P’) Hibernate: insert into EMPLOYEE (FIRSTNAME, LASTNAME, department_name, joining_date, discriminator) values (?, ?, ?, … Continue reading

Posted in Hibernate | Leave a comment

spring security 3 custom authentication manager

applicationContext.xml CustomAuthenticationFilter projectfields.properties

Posted in Hibernate, Spring | Tagged , , | 2 Comments