Complex 2 « Map « JPA Q&A





1. Some idea to map a "complex" object graph ?    forum.hibernate.org

Hi, a question for you all. I'm evaluating Hibernate to use it in a new project. What we need is to make the following class graph persistent via Hibernate. abstract class Worker class Technician extends Worker class Project Project and Technician are associated. The association is "involved in project" and is a m-n association. I'm trying to use xdoclet, ant, exportschema ...

2. use of session.delete with a complex query    forum.hibernate.org

hI, As you cas see below I try to make a complex delete using a query And it failed. Hibernate version: 2.1 Mapping documents: ....

3. Complex mapping problem. Please help!    forum.hibernate.org

For tables: users_main{ user_id, user_name, user_email } tokens_data{ token_id, secret_a, secret_b } token_user_mapping { token_id, user_id } A have this reletion: tables user_main AND token_user_maping ---> 1 to N token_user_mapping to tokens_data --> 1 to 1 How should look mapping file? Hibernate version: Hibernate 2.1.6 Mapping documents:

4. Complex inheritance.    forum.hibernate.org

Hibernate version: 2.1.6 Hi All, Since Hibernate doesn't allow to mix inheritance strategies (i.e. having a joined-subclass and after a subclass...), I have moved my initial idea of mixed inheritance to a joined-subclass strategy. So the three concepts are like this (Entity, Node(inherits from entity) and State(inherits from node)). The problem is between node and state, because I have defined an ...

5. Complex setter methods    forum.hibernate.org

We have a domain model with complex (check) logic in the setter methods. This code should not be executed when an object is created and initialised. The requirement is that the OR mapper and the user execute different setter code. I know that Hibernate is able to access the fields directly but this is not recommend. Since it is not recommend ...

6. Complex discriminators in HB3    forum.hibernate.org

Hibernate version: 3.0 alpha (CVS) Name and version of the database you are using: PostgreSQL 8.0 I want to map multiple subclasses to a single table. The problem is that the method for deriving the discriminator value can involve some fairly complex SQL. Here are a few things I looked into but I run into roadblocks in each of them (most ...

7. Insert fails for complex relationship    forum.hibernate.org

Hibernate version: 2.1.2 Mapping documents: Code between sessionFactory.openSession() and session.close(): Full stack trace of any exception that occurs: Name and version of the database you are using: Oracle 9.2.0 The generated SQL (show_sql=true): Debug level Hibernate log excerpt: I am working with a complex data model that Hibernate seems to be struggling with. If anyone has done something similar, or knows ...

8. Is it better to do complex logic to filter out results?    forum.hibernate.org

I guess this is a general database question, but I hope someone can answer it as it's more of a design question. Is it better for complex cases to just get a List of results and then filter them out using Java instead of trying to query it out exactly out of the database? I have a complex case where I ...

9. Complex primary keys    forum.hibernate.org

Hi, I have a legacy database and I'd like to start using Hibernate on the application for that database. I have a couple of tables, Doc and DocLin, that have complex primary keys as follows (database is postgres): mpbiz=# \d doc; Table "public.doc" Column | Type | Modifiers --------------------+-----------------------------+----------------------- tipo_ent_id | integer | not null tipo_doc_id | integer | not null ...





10. Complex collection mapping requirement    forum.hibernate.org

I have a database structure that models a forest of trees in a single table. This is achieved by the table having 3 fields, the primary key, the primary key of its parent item (pointing to the same table), and a field to identify which tree in the forest this node belongs to. Due to performance issues, I am not referencing ...

11. Complex Query Newbie Question    forum.hibernate.org

Quick newbie query problem here, One Project has a set of tasks. One Project has one manager (of type User) One Task has one requestedBy (of type User) One Task has one asssignedBy (of type User) (see mapping files below if you like) I want to create a query that will return all Projects that a user is involved with. Their ...

12. Mapping advice for complex M-M + inheritance case    forum.hibernate.org

Hibernate version: 3.0 RC1 I'm new to Hibernate. I've done plenty of reading of docs and got examples & test suites up and running. I'm in the initial process of creating the mapping configuration. In my application I have what I think is a fairly unusual set of relationships. I've read all of the 3.0 Reference Doc including a careful study ...

13. many-to-many mapping with complex DB model    forum.hibernate.org

Hi, I have a strange problem for defineing one-to-many or many-to-many relationships with below tables and their relationships. Table_A has composite keys with COLUMN_1 and LOC. Table_B has COLUMN_6 and LOC. When I try to map TableA_B as many-to-many, Hibernate not allowing me to use LOC twice for key declarations. I have composite PKs in all tables and LOC is one ...

14. Complex model : help needed    forum.hibernate.org

Hibernate version: 3.0 Name and version of the database you are using: MySQL 4.1 Hi, I am new on Hibernate (even if I read and I have tested for several days) and I need help for a hard part of my project. I would greatly appreciate If a "hibernate guru" could spend some of his precious time to help me doing ...

15. Complex criteria query on to Associations    forum.hibernate.org

Hi all I have a model structure like this: Companies whose have many managers whose have many benefits benefits has a name and a value (eg 'laptop' as name and 'acer' as value) I would like to make a criteria query to know which companies has managers with 'acer'- 'laptop' and 'ericson' - 'cellphone' simple adding Criterion to a Criteria like ...

16. Complex data model and hibernate    forum.hibernate.org

Hello all, I am trying to create an inheritance model for 2 objects Person and Employee, where the relation between the 2 of them is: Employee extends Person. In the other side my legacy relational model includes 3 tables Person: Table with all the details of the person including a person_id as a PK InterfaceTable: a table that works as an ...





17. complex legacy table mapping frustration!    forum.hibernate.org

Author Message eXtorn Post subject: complex legacy table mapping frustration! Posted: Thu May 05, 2005 11:41 am Newbie Joined: Thu May 05, 2005 10:36 am Posts: 13 Location: England Basically, I have 2 legacy tables I am attempting to shoe horn into an object model, and it is failing. Ive spent quite a bit of time trying what I ...

18. Mapping a complex Map    forum.hibernate.org

...

19. Its Urgent too - Complex HQL join - Please Help!!!    forum.hibernate.org

Hi All, I am stuck in writing one complex SQL in HQL. I have tried my best but no luck!!! Here I am pasting my SQL query containing some complex joins, if anybody can help, it would be highly appreciated. Its Urgent too!!! SQL Query: Code: select distinct top 10 product.product_id OID, product.product_name NAME, product.product_name, ...

20. Complex Criteria ...need an help    forum.hibernate.org

select r.* from kft_acl_categoria a, kft_categoria c , kft_acl aa , kft_categoria_report cr, kft_report r where stsacl = '1' and a.codintctg = c.codint and aa.codint = a.codintacl and aa.cafute = ...

21. Complex SQL Query as a Criteria query    forum.hibernate.org

Hibernate 3. I have a complex query I am trying to write using the createCriteria method. The problem comes in with using aliases in a sub query. Here is a SQL example Code: SELECT a.SUBNO, a.PERNO FROM HMM a INNER JOIN HEE b on (a.SUBNO = b.SUBNO) AND (a.PERNO = B.PERNO) WHERE b.EENDT=(SELECT max(EENDT) FROM HEE t ...

22. Complex Association Question    forum.hibernate.org

Hi, I've inherited a database schema where a single Relationship table is responsible for all the associations between tables, and the Relationship table stores the relationship_type, left_side and right_side columns. So, if I have 4 tables: * User * Company * Address * Telephone and the Relationship table, the relationship_type would be used to determine whether a row in the Relationship ...

23. Generated SQL too complex ?    forum.hibernate.org

Hibernate Version 3.0.5 with Spring 1.2.1 PostgreSQL 8 I think the sql generated is too complex. It is really simple. An entity of 'TEILESTAM' is associated with some entities of 'BESCHREIB' that contains localized descriptions. If I load an entity of 'TEILESTAM', the sql is ok. But if I access the 'beschreibungenInternal' field, hibernate creates a sql-statement for the entities of ...

24. Complex class loaders hierarchy    forum.hibernate.org

Hello, I've trying to use Hibernate in the environment with complex classloaders hierarchy (in the Eclipse plugin). During my experiments I've found the following problem. In order to proxy generation (via cglib) to work it is required that HibernateProxy is visible from the classloader that loads mine entities (since CGLib Enhancer by default uses superclass classloader). But in mine environment this ...

25. Need help converting complex SQL -> HQL    forum.hibernate.org

Newbie Joined: Fri Oct 17, 2003 11:31 am Posts: 19 I'm running Hibernate 3.0.5 with Oracle 9i. I'm hoping there's an HQL guru out there who can help me with this query. I'm new to HQL and am running into problems converting the query below into an appropriate HQL query. I have objects generated for each of the tables involved in ...

27. A complex criteria query    forum.hibernate.org

Hello, I need some help with a complex Criteria query. Can somebody translate the following HQL query in a Criteria query: Code: Query q = session.createQuery("SELECT procat, it FROM ProductCategory procat, Item it " + ...

28. Complex "group by" using Criteria    forum.hibernate.org

29. complex query and filter    forum.hibernate.org

Hello, Im using Hibernate 3, with Oracle. Im working on a query, and wish to apply it as a filter. The actual system and tables are much more complex, so I came up with a simpler scenario to illustrate our core problem. The nature of the query should be exactly the same as this: TABLE: ====== Lets say I have a ...

30. Help with complex relationship    forum.hibernate.org

Hibernate version: 3.0 Please forgive the fact that there are no mapping documents or code since this is a project that is starting up and Hibernate is my tool of choice for this task. I have in my hands a strange mapping that I need to model in an application that is just ramping up. The relationship I am trying to ...

31. initial saving of complex objects    forum.hibernate.org

32. complex mapping and saving set    forum.hibernate.org

Newbie Joined: Fri Oct 28, 2005 4:30 am Posts: 16 Hibernate version: 3 Name and version of the database you are using: Oracle 10g Hi, I'm having trouble with saving a set of associations, that contains data from a table PARENT and a table CHILD (CHILD inherits PARENT) CHILD and PARENT are linked by an association table ASSOCIATION Mapping documents: ####### ...

33. Complex calcs with latitude/longitude query in HQL    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.0 Name and version of the database you are using: MSSQLServer Hi people again: I am new in hibernate and I need to make the following query: I need to execute this query but i dont know how to obtain the complex calc ("acos(sin(radians()..."). I see the tag ...

34. Incorrect SQL generated for complex HQL query    forum.hibernate.org

Author Message fljmayer Post subject: Incorrect SQL generated for complex HQL query Posted: Thu Nov 10, 2005 2:31 pm Beginner Joined: Tue Nov 04, 2003 3:39 pm Posts: 47 Location: Atlanta, GA, USA From a complex query, Hibernate generates incorrect SQL by referring to a column that only exists in a different table. The same query worked properly in ...

35. need help w/ complex mapping atleast for this hib newbie    forum.hibernate.org

Your database tables look sensible to me. I would, however, follow the recommendation in the Hibernate literature to add an id column and Java attribute also to the Personpayment table. You can then map the relationship between Person and Personpayment with the mechanism (using inverse="true") in the one-to-many direction, and with the mechanism in the many-to-one direction. ...

37. More complex than basic mappings..    forum.hibernate.org

Hi all Hibernate gurus, I'd like to know if I missed something trivial... Saying 2 tables A and B A with 10 columns a1,a2,a3,a4,a5,a6,a6,a7,a8,a9,a10 B with 5 columns b1,b2,b3,b4,b5 I would like to map join from these 2 tables as 1 class with fields : a1,a2,a6 & b1, b5 ? I can't figure a way to do it in HQL isn't ...

38. Complex Criteria/Subquery question    forum.hibernate.org

SELECT av.* FROM AGENCYVEHICLE av inner join ( SELECT DISTINCT MAX(CHANGEDATE) AS last_date, AGENCYVEHICLEID AS id FROM AGENCYVEHICLESTATUS GROUP BY AGENCYVEHICLEID ...

39. Hibernate ignores lazy attribute when setter more complex    forum.hibernate.org

I'm having trouble with Hibernate 2 and lazy collections. To be more specific, Hibernate ignores the lazy attribute under certain circumstances. Image two classes Company and Person. The Company holds a lazy reference to one or more Persons like: Code: public class Company { // unimportant stuff here private Set persons; ...

40. where clause not working when fetching complex structure    forum.hibernate.org

Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message Bazi Post subject: where clause not working when fetching complex structure Posted: Wed Feb 08, 2006 9:48 am Newbie Joined: Thu Aug 25, 2005 3:59 am Posts: 7 Location: Czech Republic, Prague Greetings, I experienced some ...

41. Complex table structure problem?    forum.hibernate.org

Hello, I'm a newbie to hibernate and I have a question about how I would go about accomplishing something. We have a content management system that uses oracle to store data. The basic table structure consists of 1 +n tables for then number of different content types. e.g. Article, Image, Collection, Link,... The first table would have the columns id, assettype, ...

42. Complex SQL    forum.hibernate.org

i'm new to hibernate and am researching using sql script. i was able to generate simple sql (single table) using session.createSQLQuery() i wish now to create a more complex query based on the following: SELECT A.ACCOUNT, A.TYPE, C.LASTNAME, C.FIRSTNAME, AD.ADDRESS1, AD.CITY FROM schema.ACCOUNT A, schema.CONTACT C, schema.ADDRESS AD WHERE C.ACCOUNTID = A.ACCOUNTID(+) AND C.ADDRESSID = AD.ADDRESSID(+) AND C.LASTNAME = 'myname' what ...

43. Search in complex associations    forum.hibernate.org

44. complex criteria query    forum.hibernate.org

45. Complex Delete :(    forum.hibernate.org

Hello, I have used Hibernate 3.0 for some time now, however I still consider myself as a newby. Latly I found this problem, which I did solve, however I do not know if I did solve it in the correct way. I have the following objects. Semesters has a one to many relationship with Assignments, and an Assignment has a one ...

46. complex outer join with HQL    forum.hibernate.org

select q.question, a.answer from question as q left outer join answer as a on a.idQuestion = q.id and ...

47. Problem With Complex Table Mapping    forum.hibernate.org

48. second level cache not used in a complex legacy mapping    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp I have a complex three table legacy mapping as follows. I am able to do the mapping and generate the needed SQL. The problem comes when I try to integrate second level caching. I have set the following properties in the hibernate properties file hibernate.cache.use_second_level_cache true hibernate.cache.use_query_cache true Since I can't ...

49. Complex One-to-many relation & Discriminator on many fie    forum.hibernate.org

1) The association from Assurance to Risque should refer to Risque, not the subclasses. Hibernate will sort out the rest. There is nothing special that you have to to, it's just like having an association to a class with no subclasses. 2) Yes, it looks like formula is what you need. Put your SQL (not HQL) code in the formula. Subqueries ...

50. Complex sorting with criteria api    forum.hibernate.org

Hi, I am using criteria api for search functionality in my application. I am stuck due to some sorting issues. I have a project object which has a collection of team members. Team members are assigned different roles like Architect, Lead, Programmer, etc and presence of any role is not mandatory. A project may or may not have team members. In ...

51. Hibernate Common Idiom for Updating Complex Model Easily?    forum.hibernate.org

public Set getChildren() { return this.children; } public void setChildren( Set children) { this.children = children; } ...

52. Complex Order by Question    forum.hibernate.org

Dear all: I have a Complex Order by Question for hibernate. Here is the hbm.xml structure. --- Person.hbm.xml ---

53. Query by example : complex subquery whith historized data    forum.hibernate.org

DetachedCriteria subquery = DetachedCriteria.forClass(Position.class, "last_pos"); subquery.setProjection( Projections.projectionList() .add( Projections.max("last_pos.date")) .add( Projections.groupProperty("last_pos.userAgent") ); Example ex = Example.create(user); Criteria crit ...

54. Help with complex HQL query    forum.hibernate.org

Author Message graeder Post subject: Help with complex HQL query Posted: Tue Aug 15, 2006 5:49 pm Beginner Joined: Thu Jun 09, 2005 2:33 pm Posts: 30 I'm have a fairly complex(to me at least) query that I need to translate to HQL. It uses some MySQL date functions. Anyway here's the sql and all relevant code: Code: select ...

55. How to convert complex native SQL query in Hibernate    forum.hibernate.org

Hi All I am using Hibernate version2. I have a complex native SQL query which works fine when I execute it in Oracle from Toad or Oracle client. Now I tried to embed this query in Hibernate's createSQLQuery () but I reckon I am missing some pieces over here. Do guide me on the same. My Oracle SQL query is something ...

56. Complex HQL queries    forum.hibernate.org

I have a complex query, which involves aggregate funcions and runtime parameters. The same query needs to be executed with different ORDER BY clauses, which are specified at runtime. Because of the complexity of the query, I would like to avoid using CriteriaQuery and my question is about alternative ways to solve this problem. I lay out my ideas below. I ...

57. Need help with complex mapping    forum.hibernate.org

Hi all, I have a fairly complex mapping I'm trying to represent and I'd appreciate it if someone could help me out. I'm mapping a hierarchy which i have done successfully using joined-subclass. One of the subclasses has an array containing another class hierarchy. This hierarchy is represented using a discriminator and the class has no ID property. I cannot change ...

58. Complex Criteria Testing    forum.hibernate.org

georgef wrote: Since Criteria is an interface you could probably mock it out and test the values that are being set in it. Sure I can. The problem is that the Criterion's (which Criteria is build on) knows only how to generate its part of sql statement, but knows nothing about model beans. In other words Criterion does not have such ...

59. Criteria and complex query    forum.hibernate.org

I use hibernate 3.2. Here is my SQL query : MMETHOD associated to MCLASS using the field parent_id. MMETHOD associated to TMETHOD using the field target_id. Select * from MCLASS WHERE class_id in ( Select parent_id from MMETHOD where method_id in ( Select target_id from TMETHOD where status = ? or status = ? ) or method_id not in ( Select ...

60. Quering in collections of complex values    forum.hibernate.org

...... ...

61. Complex collection structure    forum.hibernate.org

Hibernate version: 3.1.3 Hello I have 3 pojos. Song, Artist and Instrument. A Song has a java.util.Map which maps an Artist to a java.util.Set of Instruments (that is because an artist might have played more than one instruments in a song). Is this mapping possible with hibernate? I've managed to get a Song to have a map mapping an Artist to ...

62. Criteria for complex object    forum.hibernate.org

Hi, I have the following classes, the mapping with hibernate works fine but when i try to fetch by criteria as follows: Code: Criteria criteria = session.createCriteria(Alarm.class); criteria.add(Expression.eq("alarmDetails.status.id", 1L)); I get the following error: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: alarmDetails.status.id of: Alarm; nested exception is org.hibernate.QueryException: could not resolve property: alarmDetails.status.id of: Code: public class Alarm { ...

63. Lazy, the Criteria API and complex where clauses    forum.hibernate.org

64. Complex mapping advice requested.    forum.hibernate.org

I have a problem mapping the following in Hibernate 3.1.3. We have 1 user table. This table has a relation to 1 of 3 tables to create a join with another of 3 tables and to determine the type (spare me I didn't come up with that solution :) ). Currently to retrieve a user we chech the 3 tables to ...

65. Copy/Clone strategy for complex objects    forum.hibernate.org

Hi guys, I have a real issue with cloning objects. I use session.merge(Object o) and it works fine, but after merge all the collections of the original object just get connected to the new object, so the target object just gets all the collections and the source object loses them. As I understand cascade=merge has to solve the problem, but not ...

66. Multi Threading problem (Complex issue)    forum.hibernate.org

I think that the problem in the first try is that the same BookCollection arrive at the same time (this is a webservice , so different threds, different session), so when they check if BookCollection is already exists they get false and they both trying to save it at the same time, so only one success (duplicate). i dont know how ...

67. How to do this more or less complex mapping?    forum.hibernate.org

Hi, I'm trying to set up a bit more complex mapping, but I don't get it to work. I have Account and Company as tables which are related via a Person (both relationships simply 1:n). An Account has Funds (m:n, mapping table ACCOUNT_FUND). Now I want to give some statistics about Funds per Company. To avoid some complexity I introduced a ...

68. Execute Complex SQL    forum.hibernate.org

Hi, How can I execute the following query using hibernate HQL/Criteria/Query? select num from (select rownum num ,id from( select id,entity, severity,ttime from event order by severity asc, id asc))where id=1011799 I would like to execute this query by setting paramaters, projection ...etc and do not want to generate manully and give it toHibernate. Any help is appreciated Thanks Venkat

69. Complex query(?) on many-to-many    forum.hibernate.org

Hi all, I've been banging my head against this problem for a couple of days and coming to the conclusion that there's something fundamentally wrong with my way of thinking and the query I'm trying to build. To begin I'm using Hibernate 3.2.1 against Oracle 10 XE. My project concerns cars with options on cars linked together using an association entity ...

70. Complex named query with collections and inheritance.    forum.hibernate.org

I have the following object graph and I am having an issue getting a Named to work properly. class A { Set bs; } class B { Set cs; } @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.STRING) class C { Integer id; String type; } @Entity @DiscriminatorValue("D") class D extends C { String name; } I need a ...

71. Help required on complex sorting    forum.hibernate.org

Hi all, I have created a generic search component using criteria API. It works great except a few issues and one of them is proving to be a blocker for the project. I have a class association similar to this public class Project { private Long id; ... ... private Set teamMembers; // set of TeamMember type } public class TeamMember ...

72. Help with complex mapping    forum.hibernate.org

73. Mapping complex enums    forum.hibernate.org

Hi, I have a model with multiple entities, each of which is associated with a status. Statuses for each type of entity need to be ordered and it is possible that new statuses will be inserted in the future or the order of existing statuses will change. This indicates that I cannot just map my statuses to an enum. What I ...

74. Complex Storage Model using Hibernate    forum.hibernate.org

Hi, I am developing an application server that needs a complex Storage Model. I need In memory database, persistence operations and interaction with in memory db and persistence db. Requirements: Some Data will be in memory getting from DB, but read only Some Data will be in memory getting from DB, write-read support to db Some Data will be in memory ...

75. Dealing with complex deletions    forum.hibernate.org

76. Using hibernate to generate complex reports    forum.hibernate.org

Login Register FAQ Search View unanswered posts | View active topics Board index Hibernate & Java Persistence Hibernate Users All times are UTC - 5 hours [ DST ] Using hibernate to generate complex reports Page 1 of 1 [ 3 posts ] Previous topic ...

77. Performance issue with fetching complex object graph.    forum.hibernate.org

Author Message Jikes2005 Post subject: Performance issue with fetching complex object graph. Posted: Mon Mar 19, 2007 12:13 pm Beginner Joined: Thu Mar 01, 2007 9:40 am Posts: 23 Location: UK Hi, I have an issue with fetching a complex object graph back from the database on Hibernate 2.1.8 and Oracle 8i. I'm trying to use HQL using join ...

78. Problem mapping complex keys    forum.hibernate.org

Hi, I'm having a Hibernate mapping file in which I would like to change the composite key (containing 2 long values) in such a way that it maps the id's to complex types. Let me illustrate this with my mapping files: hireDetails.hbm.xml Code:

79. ER best practices for update-aproval of complex objects.    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.2 I need to store complex objects (objects with child records), but also store potential revisions (awaiting approval) to these objects, and am not sure how I should handle my outrigger tables or mapping strategy. Imagine I have an entity representing the current set of a customer profile: Customer ...

80. Trouble to map multi level complex table    forum.hibernate.org

Hi, I have been struggling to map a multi level complex table. Here is my class A contains List of B and B contains List of C. class A{ int a; List bList; .. } class B{ int b; List cList; .. } class C{ int c; .. } Here is my mapping sql

81. Performing complex sorting/ordering in HQL/SQL/Criteria    forum.hibernate.org

I'm trying to implement pagination in several of my DAO classes. Up to somewhat recently simply fetching *ALL* results has been sufficient, but we're starting to see performance issues and are looking to implement pagination. The problem is that when we fetched *ALL* results, we could then perform very complex sorting. Now that we're only going to be receiving a portion ...

82. rather complex HQL query    forum.hibernate.org

Hibernate version: 3.2.3 Mapping documents: Project: Code: ... ...

83. Database Complex Datatype Mapping    forum.hibernate.org

Hibernate version: 3.1 - N/A Mapping documents: That's the help I need Name and version of the database you are using: Informix 9.x and 10.x This is a good general question to which I have been unable to find the answer in the forum, the general Hibernate Documentation, or just searching the web. Informix 9.x onward (and I can only assume ...

84. Confused about complex data structure!    forum.hibernate.org

Newbie Joined: Fri Aug 31, 2007 1:03 pm Posts: 1 I am relatively new to Hibernate, and need some help writing the mapping file for my database. Consider the following classes: Code: --------------------------------- ------------------ ------------------ | ClassA ...

85. Complex SQL code in the where attribute in set element    forum.hibernate.org

Hi, When loading collections I need to filter some instances (to control orphans in an inheritance hierarchy). For doing so I have the following SQL code (which has a good performance in my MySQL 5.0.1 server) Code: SELECT * FROM PDBElement WHERE idCode="1AGI" and pdbElementId IN ( SELECT pdbElementId FROM ( (SELECT P.pdbElementId FROM PDBElement P, Atom A WHERE A.pdbElementId=P.pdbElementId AND ...

86. recursive relation - complex join    forum.hibernate.org

I have the following recursive relation (E-R diagram): soggetto-------accordo | | | | |---------------| For more flexibility I use 1-* and *-1 associations (soggetto is the same table): soggetto--------accordo-------soggetto 1----------------*-------*----------- 1 Here my mappings: -----SOGGETTO MAPPING-------- soggetto_seq ....... ...

87. Complex Persistence Challenge    forum.hibernate.org

I am looking for some on ideas for how to approach the following persistence challenge. I appreciate any suggestions! I have a set of classes that define a "Form" and all of the items that a form might contain. For example, a form has things like pages, sections, text fields, checkbox fields, drop down list fields, titles, etc. My object model ...

88. Problems with OneToOne relationship and complex query    forum.hibernate.org

@Entity @Inheritance(strategy = InheritanceType.JOINED) public abstract class A { @Id @GeneratedValue private Long id; @Column int state; } @Entity public class B extends A { @ManyToOne(optional = false, fetch = FetchType.EAGER) @JoinColumn(nullable = false) private C c; } @Entity public class C extends A ...

89. Help with complex query (members of a collection)    forum.hibernate.org

We have an object model where we have a collection of categorized items and need to query using multiple conditions about these items. E.g. Retrieve all Orders where there is an item of category "shoes" with name = "nike" AND an item of category "missiles" with name = "nike". We're not really selling shoes or missiles, but that's the basic idea. ...

90. Complex findByExample    forum.hibernate.org

91. Complex Object graph    forum.hibernate.org

Author Message zahy Post subject: Complex Object graph Posted: Sun Jan 20, 2008 10:19 am Newbie Joined: Sun Dec 30, 2007 3:58 pm Posts: 7 Hello, I am trying a very simple example of persisting an Object graph on a Oracle 10g DB. I am using hibernate 3.2.5.GA and annotations. I fail on integrity constraints , I could see ...

92. Complex enums mapped as a class not property with manyto-one    forum.hibernate.org

Newbie Joined: Wed Mar 12, 2008 9:05 am Posts: 1 Hello everybody, We have been racking our brains about this one for a bit, and wanted to see if anyone had any experience in doing something similar. The basic idea that we are trying to accomplish is to map complex enums (an example of which is below) as the receiving class ...

93. Complex mappging case    forum.hibernate.org

Dear all, My question is maybe closer to a conceptual point of view than to a real hibernate problem, but I think this is the right place to post it. My situation is the following : * My class A implements the interface i * My class B also implements the interface i * My class C use either A or ...

94. Calling complex stored procedure in Hibernate.    forum.hibernate.org

[color=green]hi all, Im new to hibernate. im using hibernate 3.2.6 im able to call simple stored procedure in oracle 10g like procedure returns a curser from single table. but my requirement is i need to call a complex stored procedure... like it has 6 IN parameters and 1 OUT parameters and those IN/OUT parameters are not belongs to single TABLE. those ...

95. Complex hibernate mapping    forum.hibernate.org

Hi everyone, My application's entity model isn't equal the data model. In some cases, an entity is represented by TWO tables. In others, some fields of a table are mapped in a class and the others, in another entity. By now, i am using JDBC in the persistence, but I intend to change it to Hibernate. Does anyone know if it ...

96. Updating object while changing its class (complex problem)    forum.hibernate.org

Hello. This post is somehow related to a previous one ( http://forum.hibernate.org/viewtopic.php?p=2384248 ) The context: (running latest Hibernate stable version on Linux Sun's JDK 1.6, MySQL) I have an UserAccount class that is extended by an AdminAccount class. Both are mapped to Hibernate, I use one table per class hierarchy. The UserAccount has an unique constraint on the userName property. For ...

97. Complex database work    forum.hibernate.org

98. How to use multi-level, deep, fetch join in complex queries?    forum.hibernate.org

Hi guys, I'm pretty new to NHibernate, and I need some help. I'm using the latest release of NH, and I'm querying SQL Server 2005. My tables and entities have the following structure: Portal ....Id ....Names (Dictionary) ....Settings (Dictionary) ....Tabs (List) ........Id ........Name ........Names (Dictionary) ........Settings (Dictionary) ........Modules (List) ............Id ............Name ............Settings (Dictionary) ............Names (Dictionary) ...

99. Complex Mapping with ?    forum.hibernate.org

I have 5 tables like this : Product : ProductId Product_Categories : ProductId, CategoryId, IsActive Categories : CategoryId Publisher_Categories : PublisherId, CategoryId, IsActive Publishers : PublisherId And I am only intrested in 1 object which is "Product" , which I want it to include List PublisherIds. Which mapping style should I use ? Help would be apritiated

100. Ordering by two complex, nullable attributes    forum.hibernate.org

I have an entity that has two nullable attributes: a team and a person. Both of them are entities themself and one of them is always null. Now I'd like to order the entity by the team's and the peron's name combined in one column. But because one of them is null, simply using "order by team.name, person.name" doesn't work. How ...