primitive « Collection « JPA Q&A





1. collection of primitives    forum.hibernate.org

Hi, I've been looking all over for documentation, but can't seem to find anything. I'm trying to map a collection with primitives (Floats), but can't seem to work out how to. I've tried a set, adding the one-to-many with class java.lang.Float, but Float obviously hasn't got any tags and is therefore not mapped. The association fails. Is there a solition that ...

2. ConstraintViolationException with primitive collection    forum.hibernate.org

My object has a list of primitive values (say, strings), where values could possibly be null. I'm getting a constraint violation when trying to change previously saved null to non-null. I've implemented the simplest possible test case that reproduces the problem. Test scenario is: Session 1 1. Set a.b[0] to null 2. Save or update. Session 2 3. Set a.b[0] to ...

3. Collection of primitive types    forum.hibernate.org

I'm new to Hibernate, and am using it in a GWT environment. I've got a class Article which has a field Category_Ids which is a collection of Integers: Code: Set category_ids = new HashSet(); I've got a postgres database with a table category_article (category_id integer, article_id integer) My Article.hbm.xml file contains the following mapping: Code: