table « POJO « JPA Q&A





1. map single pojo with multiple tables    forum.hibernate.org

Hi Everyone, I am facing problem to map single pojo to multiple table when second table has multiple values for single id. sql query ------- SELECT p.id,p.name,ph.phno FROM Person p,phone ph where p.id=ph.id and p.id=1; here one person id has multiople phone numbers. expected result is 1 abc 1234 1 abc 5678 1 abc 3578 but iam getting result like below ...

2. Mapping one POJO to two identical tables    forum.hibernate.org

3. mapping one pojo with multiple tables    forum.hibernate.org

5. How to use POJO without mapping to a table?    forum.hibernate.org

Hibernate version: 2.1 I ran into a problem while creating mapping for legacy data, which is not designed quite clearly. I have the following mappings: [code] ... ... [/code] The table OFFICE contains historical ...

6. Nested POJOs to the same table mapping    forum.hibernate.org

Hibernate version:2.0 class Category { private Long id; private Long parentId; private Set children; .... } Hi All, I have the above defined mapping and an equivalent POJO. The table CATEGORY has a column ...

7. 1 POJO - M tables ?    forum.hibernate.org

This is just a general query, regarding whether this can be done or not ? My question is Can a POJO class be created that can refer to different tables at different times. Eg object of class "Address" which can refer to "PersonAddress" (table) when an object of "Address" type is stored in "Person" class (a table also exists by the ...

8. basic question, using the same POJO in two different tables    forum.hibernate.org

Hi, I would like to have two mapping files that use the same POJO: .... and The problem is that my HQL saves and queries act upon the object Apple and it seems it has no way of knowing which table to use-- How can I explicitly tell it which table ...





11. Possible to tie POJOs back to UDFs instead of tables?    forum.hibernate.org

We have a very complex security model that is enforced via UDFs. Therefore we never do a "SELECT * FROM clients" it is always "SELECT * FROM secure_clients( CURRENT_USERS_ID)". I'm curious if this can be accomplished via hibernate? I realize I can call arbitrary SQL via named queries, but can hibernate be made to use these secure UDFs directly? We specifically ...

12. Map POJO to multiple tables    forum.hibernate.org

I have the situation where I need to map an object to history tables in a database that has the name in the form of History_Year_Month. This table gets generated every month, and depending on when messages are closed, the message needs to get put in the table matching the message closure month and year. Is the possible? Thanks