jpa-2.0

Advanced search

We are going to provide an advanced search option on a system that will let users find events that matches a name (textual search), have on or more tags assigned to it and that will start before or after a given date. Should I consider using hibernate search or something similar? Or should I just generate some jpql queries to get that s...

Avoid 1 level cache issues while using @PersistenceContext(type=PersistenceContextType.EXTENDED)

I just configured @PersistenceContext(type=PersistenceContextType.EXTENDED) on my DAO classes to get lazy loading working on the view layer (needed to get it not closing the session for this) but I am having issues with 1 level cache (I imagine).. Because the object is cached even with my second level cache settings off. After turned off...

Can I implement if-new-create JPA strategy?

My current persistence.xml table generation strategy is set to create. This guarantees that each new installation of my application will get the tables, but that also means that everytime the application it's started logs are polluted with exceptions of eclipselink trying to create tables that already exist. The strategy I wish is that t...

Why does eclipselink consume the whole allocationSize each time it's rebooted?

I've just noticed that for my entity's id, eclipselink assigns an id 1 + the previously greated assigned IN THE SAME SESSION (1), as opposed to in the element table (2). This goes against my application expectations. What's the easiest way to tell it to do 2? @Id @GeneratedValue(strategy = GenerationType.AUTO) private int objId; And...