persist « JDBC « JPA Q&A

1. using JDBC with persistence.xml

I am building a framework that manage the access to the database. the framework getting tasks from the user and handle a connection pooling that manage the access to the database. the ...

2. Hibernate is persisting entity during flush when the entity has not changed

I'm having a problem where the entity manger is persisting an entity that I don't think has changed during the flush. I know the following code is the problem because if I ...

3. setting persistence context to read-only in jpa

we are going to be working with an old database. so it is very crucial that we do not modify the database/table/schemas under any circumstances (from the reporting modules), and as such ...

4. Hibernate: javax.persistence.* driver properties cause UnsupportedOperationException: The user must supply a JDBC connection?

I'm using

<property name="javax.persistence.jdbc.driver"   value="com.mysql.jdbc.Driver" />
<property name="javax.persistence.jdbc.url"      value="jdbc:mysql://localhost/whatever" />
<property name="javax.persistence.jdbc.user"     value="" />
<property name="javax.persistence.jdbc.password" value="" />
in all of my JavaSE test apps ...

5. com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column , hibernate

I am getting this error when i am calling a Hibernate Criteria with hibernate beans class. Here is my hibernate bean:

private String adId;

private String vendorLoginId;

private Date needCorrectionDate;

private Date toDate;

public String ...

6. How to get a JPA-persisted String[] column by ResultSet#getString() in JDBC?

I want to store multiple checkbox values in a single DB column. I don't want to store in a seperate table with @OneToMany. This is the JPA entity:

@Column(name="ARRAY_FOOD" )
private String[] arrayFood;
...getter and ...

7. Any persistence framework better than hibernate

Hi all I'm building a J2EE application using MySql to handle many concurrent database connections. Not having used hibernate for 5 years, I was wondering if something better had rolled-around. How's TopLink EclipseLink? My criterion: 1. Reliability. Less bugs. 2. Performance under load 3. Active development and bug fixing 4. Documentation quality Hoping we have members with actual usage experience. Thank ...

9. Persistent class with non jdbc storage

Hibernate version: 2 or 3 Hi, need to persist a class with a non jdbc storage. I found a posting from Gavin King (back in 2002) concerning support for this in the design of Hibernate, see ... 00049.html The current documentation also indicates that this is supported, see feature list under "Persistence strategies". However, I have not found any concrete ...