-
Recent Posts
- Follow softwarecave on WordPress.com
Archives
- December 2021 (1)
- October 2021 (2)
- April 2018 (1)
- March 2018 (3)
- February 2018 (1)
- February 2017 (4)
- December 2014 (3)
- November 2014 (2)
- August 2014 (1)
- July 2014 (2)
- June 2014 (2)
- May 2014 (2)
- April 2014 (5)
- March 2014 (9)
- February 2014 (11)
- January 2014 (6)
- September 2011 (1)
Categories
Category Archives: JPA
Mapping a map of simple types in JPA using @ElementCollection
In the previous post I have shown how to easily map a collection (e.g. Set or List) of simple types in JPA. Today I would like to present how we achieve something similar for Java maps like HashMap or TreeMap. … Continue reading
Mapping collection of simple type in JPA using @ElementCollection
JPA framework provides good support for mapping collections of value types. The value types can be either simple types like Integer or String, or custom embeddable types. In this short post I would like to present two most popular mappings … Continue reading
Database schema creation in JPA using SQL scripts
Recent versions of JPA provide a feature to automatically create the database objects (like tables, sequences or indexes), load initial data into database on application deployment; and also remove them after the application is undeployed. All that is needed is … Continue reading
Primary key generation in JPA
Generation of primary key values is a very important functionality of relational database management systems. The main idea is to let RDBMS automatically calculate and assign primary key value to the row being inserted into the database table. This not … Continue reading
Using JPA and JTA with Spring
When building a web application, we will sooner or later need to somehow store data entered by users and retrieve it later. In most cases the best place to keep this data is a database because it additionally provides many … Continue reading