Type « Table « JPA Q&A





1. read/write contention on a forum-type posting table    forum.hibernate.org

Hi, I am building a database for posting forum topics that relate to pages of a base document. It is expected that there will be lots of new posts, and I'm trying to think of creative ways to reduce contention. So I have a Post bean. And using MySQL/ISAM. I wonder if I can/should somehow split the bean, which has a ...

2. Table Per Class Hierarchy Type Confusion    forum.hibernate.org

I'm experiencing strange exceptions with my JPA-based table-per-class-hierarchy implementation. My classes are defined similar to the following: Code: @Entity @Table(name = "animal") @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.CHAR) @DiscriminatorValue("X") // There is no type "X", only "D" (dog) and "C" (cat), but JPA wants a value here public class Animal implements Serializable { // various ...

5. types of tables    forum.hibernate.org

6. Storing random object types in same table?    forum.hibernate.org

I've got a situation where I'd like to store objects of different types (strings, numbers, dates, booleans, etc) in the same table, with a single insert/retrieval point ("getValue()?) on the same mapped class. I don't really want to use a byte array, since I'd prefer if these values, once stored in the database, were human readable (unless it's a complex object ...