Map 6 « Map « JPA Q&A





1. Where clause in mapping configuration    forum.hibernate.org

Dear All I'm in trouble to configure this mapping in hibernate: I have two attributes in class X to class Y. Lets say y1 and y2. So, there will be two rows in table Y with the records y1 and y2, both with a foreign key to x, and what differs the record y1 (or y2) to attribute/object reference y1 (or ...

2. Wacky Mapping Problem    forum.hibernate.org

Hibernate version: 2.1.3 (tested with 2.1.7 as well) I have a a named native sql query that returns about 20,000 records. The basic format of query is as follows select a.field1 as {cat.field1}, a.field2 as {cat.field2}, a.field3 as {cat.field3}, b.field1 as {hat.field1}, b.field2 as {hat.field2}, b.field3 as {hat.field3} from catTable a inner join hatTable b on a.field2 = b.field1 where every ...

3. circular reference / mapping pb?    forum.hibernate.org

public class BasePatient implements Serializable { /** identifier field */ private Long key; /** persistent field */ private String lastName; /** persistent field */ private String firstName; /** persistent field */ ...

4. One to One mapping problem    forum.hibernate.org

Author Message ky220 Post subject: One to One mapping problem Posted: Thu Feb 17, 2005 12:47 am Newbie Joined: Thu Feb 17, 2005 12:35 am Posts: 1 Hello all! I am a student part of a team which is using Hibernate with Struts and Spring to create a web portal of sorts, and I am having an issue setting ...

5. Mapping problems    forum.hibernate.org

Read the rules before posting! http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 2.1.7 Mapping documents: Full stack trace of any exception that occurs: com.rhnet.exception.PersistenceException: at com.rhnet.persistencia.dao.HibernateDAO.insert(HibernateDAO.java:89) at com.rhnet.persistencia.vaga.test.VagaDAOTest.testInsert(VagaDAOTest.java:52) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) ...

6. many to one mapping    forum.hibernate.org

I am digging int xdoclet nd hibernate but can u please tell how to do this for a real world scenario like user login and upload images where schema will be *table users* userid password* image table* userid (foriegn key refers userid of users) imagename *Two classes user and image can u please tell how can i modify these two classes ...

7. lame mapping problem    forum.hibernate.org

Hi I think my problem is quite simple but have no idea how to handle it. As a result of hibernate query I want to get collection of objects. Each of them is filled with data taken from several tables. I need this data only for read only purposes. Let's see an example: There are tables: USER (id, name), ORDER(id,user_id,date) I ...

8. hibernate mapping dilemmas    forum.hibernate.org

Hi This is description of my problem: I have two tables: THREAD (id, name) and THREAD_STAMP (thread_id,user_id) First table describes the forum thread , the second describes if the thread was read by particular user. Now I want to get the list of threads but with info if the thread was read by particular user. From the sql level it should ...

9. Mapping Question    forum.hibernate.org

I 'm stick to use a legacy database whose schema I cannot modify. First, there is a Message table that uses a compound key (idMessage, idLang) . It centralizes I18n messages Most other tables reference the Message Key and have an idMessage column. I would like to have a one-to-many mapping from each entity to the Message entity. Unfornutalely, there seems ...





10. Many to one mapping right?    forum.hibernate.org

11. Getting mapping info...    forum.hibernate.org

12. general OR-Mapping question    forum.hibernate.org

My question is about usage of OR mapping tools like Hibernate and JDO. Do these frameworks really allow me to freely design a domain model first (without worrying about tables and columns) and then map my java domain model to my persistent RDBMS schema (the design of which is not constrained in anyway to the OR mapper framework I am using ...

13. mapping inner classes    forum.hibernate.org

Hi, I have this class: Code: public class Periodo extends Entidad { private String codigo; private Date desde; private Date hasta; private transient Ambar ambar; public Periodo() {} public ...

14. Advice on Hibernate 2.1.6 mapping optimization    forum.hibernate.org

Newbie Joined: Wed Mar 09, 2005 5:58 pm Posts: 1 Hi everyone - I have a question not about a bug but about performance issues and your opinions on the best mapping strategy. I'm using Hibernate version 2.1.6 with Spring 1.1.3, and have the following mapping.

15. mapping problem    forum.hibernate.org

2.1: ...

16. mapping problem    forum.hibernate.org

2.1: ...





17. mapping the concat function    forum.hibernate.org

18. reverse engineering and mapping scheme dilema    forum.hibernate.org

Hi forum! I recently started learning how to use hibernate. I started with hibernate 3 and the eclipse plugin tools(still alpha). I am having a dilema with the way I am doing things. Here is a breif explanation of the problem, and I hope someone would be able to guide me in the right direction. Please be gentle as I am ...

19. Conditional mapping?    forum.hibernate.org

I have a class Foo with one-to-many mapping relationship to another class Bar, which has a "flag" column with boolean type. Now is there a way to build a one-to-many mapping b/w Foo and Bar so it only returns the Bar objects with a true flag value? I could do this by executing a criteria query but wonder if I can ...

20. Mapping with map    forum.hibernate.org

Hi, I have a question about map, i have a map with this mapping file A.hbm.xml ... ... B.hbm.xml ... ... My problem is that, a_uid_key is the same that aId (in B). Hibernate create 2 fields for this. There is a mapping to solve this and use ...

21. Strange many-to-many mapping..    forum.hibernate.org

How can I map these classes?? class A { long idA; List listB; } class B { long idB; Set setA; } I know that there should be table AB with fields: idA, idB and order (of listB). I want to create in table AB composite key (idA, order). Is somebody, who know how I could make it??

22. Hibernate mapping newbie question    forum.hibernate.org

SORRY FOR THE FORMATTING ABOVE, PLEASE IGNORE IT. THE SAME MESSAGE FOLLOWS: Hibernate version:2.1.8 Hi, I have a newbie mapping question. I have a simple class I want to map (RewardImpl). It has a number of easy properties (Id, Amount, etc.) but it also has a property called period which is of type Duration. Duration is an interface with many concrete ...

23. Mapped Expression    forum.hibernate.org

I haven't been able to find an elegant way of handling this. I often display and filter a list of contact's based on their names. My database stores first_name and last_name as separate fields. However, I'd like to be able to represent the concatenation of these in my code as a single field called full_name. I can easily add a getFullName() ...

24. use Map in one to many Mapping    forum.hibernate.org

25. How to mapping a one-to-one using same class inner??    forum.hibernate.org

I dont think you can do such a thing (correct me if I am wrong), because according to hibernate you cant include the same column of the table twice in the hbm file. It will throw an exception. More over according to your requirement its a never ending process, I mean a Cat is having one Cat and it has another ...

26. Which mapping to use?    forum.hibernate.org

27. Transitive Many-to-One Mappings    forum.hibernate.org

Iterator it = instanceOfA.getBs().iterator(); while (it.hasNext()){ if (s == null){ s = ((B) it.next()).getCs(); } else{ s.addAll(((B) it.next()).getCs()); ...

28. one to one mapping problem I met    forum.hibernate.org

I am trying an one to one mapping example and there are something confused me. thank you for your help. ------------------------------- Hibernate version:2.1.2 ------------------------------- the whole files include: Author.java --POJO Person.java --POJO TempTest.java -------------------------------- and two tables were defined: -------------------------------- Code: DROP TABLE AUTHOR CASCADE CONSTRAINTS ; CREATE TABLE AUTHOR ( ID INTEGER ...

29. Mapping Strategies    forum.hibernate.org

Thank you very much for your response on this... So here is my exact scenario that I am trying to determine if Hibernate/ORM is the right solution. I have a project right now that is a J2EE application (web interface, SLSB Session Facade, DAOs, TOs, etc). The database is an Oracle system but is structured from an older set of requirements, ...

30. what is wrong with this mapping?    forum.hibernate.org

I have an User who has 2 set of Area associated. I used the follow mapping, but when I save the user hibernate say "found shared references to a collection": -User.hbm.xml: ........ ...

31. Advanced many-to-many mapping question    forum.hibernate.org

Hi all, I have the following schema: User (user_id, firstname, ...) user_id is pk Department (dept_id, name, desc) dept_id is pk Role (role_id, name, desc) role_id is pk UserDeptRole (udr_id, user_id, dept_id, role_id) the last is the join table (many-to-many) between user and dept. For each user / dept assocation their can be one role. udr_id is just an autoincrementing pk ...

32. Can this mapping be done?    forum.hibernate.org

Dear readers, I am currently adapting an existing project to use hibernate 3 on Oracle 9. Hibernate is new to me but nonetheless I have the idea that the following situation might be impossible to implement. I have about 10 different object (each with their own tables) that have a set of status-information-records. Status-information is stored in 1 table for all ...

33. [Hibernate]Master-details mapping?    forum.hibernate.org

Supposed I have two tables (It's "pseudo-code" schema of what I have now) [Address] *Street *City *State(like, "NY","CA","PA") *Zip (Primary Key: Street+City, well, it sounds silly, but again, it's pseudo) [States] *StateID(like,"NY","CA","PA") *StateName(like, "New York", "Califonia") [Primary Key: StateID] in Address.hbm.xml, I have --------------------------------------------------------------------- [as below] ... ---------------------------------------------- in Address.java, I have --------------------------------------- ... private Set state; public void setState(Set state){ ...

34. one-to-many mapping    forum.hibernate.org

When you have define the mapping as one-to-many trhough set or Bag , Say in each city can have many provinces if i am not wrong. So have an one-to-many mapping with set from city to Province. In your City Class(value Object) file define Set provinces = new HastSet(); Now when you quiery on the city table for a particualr city ...

35. Mapping question    forum.hibernate.org

Hibernate version:2.1.6 Hello there! Our system has an object that one of its properties is not mapped to a table, instead that property comes from a 1-1 table relation (We are not allowed to change schema) So I have a Product table ProductType table and Product_ProductType table as odd as it seems, product does not has a type on it, instead, ...

36. Problems with configuration mapping    forum.hibernate.org

Hibernate version: 3 Mapping documents: Code between sessionFactory.openSession() and session.close(): ...

37. how would you map this?    forum.hibernate.org

i'm extending an existing Party domain model. Party is the parent type of Organization, Individual and Person, and aggregates various Contacts (Address, Phone, Email). i need to relate one Party to another by role. the UC dictates getting all parties in (subject or object) role to the given party. so i might introduce a table to hold the fairly static role ...

38. one to many to one mapping question    forum.hibernate.org

39. ImageIcon mapping    forum.hibernate.org

Author Message tezem Post subject: ImageIcon mapping Posted: Sat May 07, 2005 12:28 pm Newbie Joined: Sat May 07, 2005 12:16 pm Posts: 3 The topic says it already. I have a class with an ImageIcon as an attribute. Now as I am a total newbie and couldn't get this information out of the documentation, I ask myself if ...

40. Mapping a LinkedHashSet    forum.hibernate.org

Is there a way in Hibernate to represent the behavior of a LinkedHashSet? I have the following situation: An instance of Class A contains a Set of instances of Class B, but the set must be arbitrarily ordered by the user (i.e: it is not "sorted", but "ordered"). So, I need a mix of List and Set, which is precisely what ...

41. Mapping of java.net.URL    forum.hibernate.org

42. Persons & Friends -- newbie mapping question    forum.hibernate.org

Hello, can anyone explain to me how one might implement the classic "Person/Friend" problem using Hibernate? in relational land a "Person" table has an ID and some info and a "Friend" table is a self-join of the "Person" table -- that is, the "Friend" table has two colums holding the ID's of two persons. in object land, a class Person has ...

43. Mapping Interfaces    forum.hibernate.org

This must be a common problem, I'm trying having the methods you want public in one MyInterface, and the ones you want private in HibernateInterface extends MyInterface. Then an implementor has to implement HibernateInterface, and a 'user' uses MyInterface. When I want to extend MyInterface I have to do MyExtensionInterface extends MyInterface and HibernateExtensionInterface extends MyExtensionInterface implements HibernateInterface and add the ...

44. mapping problem    forum.hibernate.org

I can't map the following table structure in hibernate3 xml. The contacts table links to the countries table using the CID, not the primary key of the countries table, because the application must be language indepedent. The CID is not unique, so many-to-one doesn't work here. I know there are better ways of doing this (using an extra table for the ...

45. Question on mapping a peculiar ANY    forum.hibernate.org

After reading and thinking a bit more, i seems obvious to me that we can conclude the following : We need a way for hibernate to accept a composite key for one-to-many mappings. This would imply a kind of : "one-to-manyAny" mapping By doing so (using both ID and CLASS keys) hibernate should be fully set to find out what elements ...

46. Page to PageAsset mapping advice    forum.hibernate.org

Hibernate version: 3 Hi, I am after some advice for modelling a mapping file. I wish to model a Page that contains a collection of PageAsset. There will be many Pages that can potentially contain the same PageAssets for example let's say a PageAsset is a news article. We would wish to have several Pages that contain this particular PageAsset. I ...

47. Mapping problem - one to many *and* one to one    forum.hibernate.org

Newbie Joined: Tue May 10, 2005 6:25 am Posts: 19 Location: London I've got a problem writing a mapping to a legacy database of mine. I gave two entities; company and currency. A company can have any number of currencies defined for it. So Company has a standard one to many relationship with it's currencies. Each company also has a single ...

48. mapping overhead looks to be more important as I've expected    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.03 Problem: I'm trying to introduce hibernate into our already existing application. The goal is to use it for new development and every time we need to rewrite an already existing part. I was asked to do some prototyping on concrete examples form our application. I have found out ...

49. any-mapping in hibernate3    forum.hibernate.org

50. Hibernate Mappings    forum.hibernate.org

51. Hibernate Mapping Problem with Relationsships    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3 Hey, I got a quite problematic thing here, I have got 3 mappings, system, customer, systemtype. To keep my database clean I used some foreign keys. After creating my mapping files I got stuck at my dao test. Here is the top-part of my System.hbm.xml: Code: ...

52. Advanced(?) mapping: 2 levels deep "shortcut"    forum.hibernate.org

Collection userRoles = user.getRoles(); for ( Iterator ri = userRoles.iterator(); ri.hasNext() ;) { Role role = (Role) ri.next(); Collection rolePermissions = role.getPermissions(); for ( Iterator pi = rolePermissions.iterator(); pi.hasNext() ;) { Permission p = (Permission) pi.next(); permissionNames.add( p.getName() ); ...

53. Bi-directional mapping using     forum.hibernate.org

Hi, I posted a similar question earlier, but I've had a chance to brainstorm a bit more: What I'm looking to do is a polymorphic bi-directional 1-to-n mapping. I have class A, B and C who all have 1-to-many relationships with X. A owns0 or more X's, B owns 0 or more X's, etc. I want X to link back to ...

54. java.net.URL mapping    forum.hibernate.org

Hi, How do I map a java.net.URL property to the database without it putting some weird binary stuff in the field? I just want it to store the URL as a String which I think is how most ppl would expect it to work. Isthere a UserType that I should use? Many Thanks for a great product Peter Gelderbloem

55. mapping interface implementing classes    forum.hibernate.org

I am new to Hibernate annotations. After we immplement the annotations in pojos, do we still need some tool to create the mapping files or the hibernate will directly work on the annotations? If we need tools to create mapping files, what kind of tools should we use? If use ant, what task? Is there any ant example? Thanks. Wade

56. hibernate does not manage mapping configuration dependency??    forum.hibernate.org

cfg = new Configuration(); cfg.setProperties(hibernateProperties); for (Iterator filenames = filenameList.iterator(); filenames.hasNext();) { String filename = (String) filenames.next(); if (filename.endsWith(".hbm.xml")) { // Get filename of file or directory cfg.addFile(mappingPath + File.separator + filename); }

57. Simple (newbie) many-to-one mapping question    forum.hibernate.org

Hello, I've got a simple mapping question for you more experienced Hibernate users... In my old legacy DB, I have two tables - one defining Mail Triggers, and one for Mail Content. Each trigger (usually) is associated to one MailContent row through the use of a non-enforced foreign key (mysql). I configured MailTriggers to have a many-to-one relationship to MailContent, and ...

58. project result set into Map    forum.hibernate.org

Hi there, I'm kind of new to Hibernate and want to implement a generic query, like specifying a number of column names, and get the result into a Map, as columnName, value pairs. Of course this Map object would represent a row from the database, and these Maps would be placed into a List. Can i use the projection feauture of ...

59. Mapping question    forum.hibernate.org

Hibernate version: 3 I have 2 tables : Client and Type. The Type table has a primary defined with 3 fields : APPLICATION, TABLE and CODE. I would like to map a field corresponding to the client type. How can I tell hibernate that my field clientTypeCode correspond to a TypeCode class for APPLICATION = 'XXX', TABLE = 'Client' and CODE ...

60. Mapping multilevel (>2) "detail"    forum.hibernate.org

I need to map the follow class arrangement. class A { String name; B [] b; }; class B { String stuff; C [] c; } class C { String moreStuff Integer [] x; } I would expect to have tables something like: A - id name B - id stuff index C - id index index2 morestuff CX ----- id ...

61. set mapping    forum.hibernate.org

62. Advanced Mapping    forum.hibernate.org

Newbie Joined: Mon Jun 20, 2005 7:09 pm Posts: 1 Hi, I have searched the forums to a similar solution to this problem but have had no luck. I have an existing schema that defines tables as follows: Tables Table 1: ledger_tx ---------------------- ledgerid int8 (primary key) Table 2: invoice ---------------------- invoiceid (references ledger_tx.ledgerid) Table 3: ledger_lines ------------------- ledgerid (references ledger_tx.ledgerid) ...

63. Strange mapping behaviour    forum.hibernate.org

I am new to Hibernate and I cannot figure out what is going on. I use Netbans and the pointbase database which is bundled with the Sun Java Application Server. I have a simple table HIBTEST which has two fields (ID (PK),NAME ). I try to create a simple application that will just save an object to the database. My POJO ...

64. Virtual "one - to - one" mapping    forum.hibernate.org

Hello All I am (again) having a problem with mapping a legacy data to a hibernate class. My "Info" class has an these properties Int id; String name; Image mainImage; id and name are mapped to the "Indo" table. The class "Image" is mapped in the usual fashion to "Image" table - ID, description etc. There is another table "rel_table" to ...

65. Hybrid mapping thoughts    forum.hibernate.org

I have a large class hierarchy which I am attempting to map using a mixture of techniques. In particular, I want to take advantage of the effeciency of the table per hierarchy and table per class polymorphism. I have a hierarchy which looks something like the following: [code]interface Top (reflexive association Component roles: group, part) (reflexive association Dependency roles: dependent, independent) ...

66. where= in set mapping    forum.hibernate.org

67. Stored procedure resulset mapping    forum.hibernate.org

Hi, I have to call some stored procedures on a 4D database and to map the resultsets. Here is an example : XX_StoredProc_GetPContac take 3 parameters (int,int,String) and return a resulset that I just want to map to Document entities. Hibernate version:3.0.5 Mapping documents:

68. Conditional Mapping    forum.hibernate.org

mjstein6300 wrote: Not sure if this is possible with hibernate, but.... I have one object, that depending on its state, can map to two different tables. Is there a way to have two mapping files for one object, and conditionally pick which one to use based on a flag in the object? Thanks. I think you need to be a little ...

69. Cann't map a synonymy?    forum.hibernate.org

Serialcc_seq

70. Problem with mapping    forum.hibernate.org

Hi all, I have problems with this mapping. I want to know what's wrong Error Code: Code: Caused by: org.hibernate.PropertyNotFoundException: Could not find a setter for property Permisos in class bbdd.modelos.tPerfiles at org.hibernate.property.BasicPropertyAccessor.createSetter(BasicPropertyAccessor.java:156) at org.hibernate.property.BasicPropertyAccessor.getSetter(BasicPropertyAccessor.java:150) at org.hibernate.mapping.Property.getSetter(Property.java:245) ...

71. Problem with mapping    forum.hibernate.org

Hi all, i have a problem. I have this two hbm.conf: tUsuarios.hbm.xml Code: ...

72. Mapping Java classes to Business labels    forum.hibernate.org

If anyone out there has figured out a clever way to do this, let me know. Basically, I want to perform mappings such as "com.domain.Customer" = "Client" "net.domain.Item" = "Item" "org.domain.CustomerItem" = "Purchase" This way, when the business side of the project want to replace "Purchase" with "Procurement", I make a change in one configuration file, instead of 10 changes in ...

73. mapping problem    forum.hibernate.org

74. Mapping problem - newbie    forum.hibernate.org

Newbie Joined: Fri Jul 08, 2005 9:55 pm Posts: 2 Hi, I am learning Hibernate and have stored a User object to a users table, but when I query for the object I get the following error: ERROR http-80-Processor25 org.hibernate.hql.PARSER - *** ERROR: users is not mapped. WARN http-80-Processor25 org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class org.hibernate.hql.ast.QuerySyntaxError ERROR http-80-Processor25 StandardWrapper[/ERSS:action] - Servlet.service() ...

75. Hibernate 3 Mappings API examples?    forum.hibernate.org

I am aware of page on dynamic mappings, but is there anywhere documentation or an example on how to fill in the Mappings object? It looks to me like org.hibernate.mapping is not meant for the casual user and I would have to follow the HbmBinder class in much detail to figure that out. Is there a better way? Is the general ...

76. One-to-many bi-directional mapping problem    forum.hibernate.org

Hibernate version: 2.18 Mapping documents: CategoryImpl.hbm.xml catg_sysid_sequence HIVAL nextCategoryId

77. problem with mapping one-to-many    forum.hibernate.org

Hibernate version:2 Hi all! I want mapping 2 entity, Testata and Eccipienti. They've a one-to-many relationship: a Testata can have many Eccipienti and an Eccipienti can have only a Testata. In Eccipienti I've a composite-id... so I map: Code: ...

78. Mapping of Interfaces    forum.hibernate.org

79. mapping many to many for same class    forum.hibernate.org

i'm having trouble mapping this: i have a Bug object, which can contain zero or more related Bugs. i have a join table "rel_related_bugs_tbl" to represent this, which contains int rel_bug_id int rel_related_bug_id i believe i'm setting the related bugs in my object properly here: Code: Session sess = Global.getSession(); Transaction tx = sess.beginTransaction(); Bug bug = new Bug(title, description, solution); ...

80. Hibernate Mapping problem - Really a Challenging One    forum.hibernate.org

I have the follwing entities 1. Category 2. Sub- Category 3. Product 4. Attributes 5. Item Category may contain zero or many sub-cats. Sub-category may contain zero or more products. Product have the many to many relation with Attributes. and Product may contain the zero or many items. Here the problem comes. Here the Item is like an instance of the ...

81. Hibernate Mapping Problem    forum.hibernate.org

82. many-many mapping outside a class    forum.hibernate.org

83. Java 1.4, Enumeration mapping    forum.hibernate.org

Author Message ARossi Post subject: Java 1.4, Enumeration mapping Posted: Tue Jul 19, 2005 7:05 am Newbie Joined: Tue Jul 19, 2005 6:39 am Posts: 4 Location: Venice, Italy After reading the material about Java 1.5 enum and Hibernate UserType http://www.hibernate.org/272.html I did the following to use that concepts in java 1.4. I defined an abstract enumeration class: Code: ...

84. Java 1.4, Enumeration mapping    forum.hibernate.org

Author Message ARossi Post subject: Java 1.4, Enumeration mapping Posted: Tue Jul 19, 2005 7:05 am Newbie Joined: Tue Jul 19, 2005 6:39 am Posts: 4 Location: Venice, Italy After reading the material about Java 1.5 enum and Hibernate UserType http://www.hibernate.org/272.html I did the following to use that concepts in java 1.4. I defined an abstract enumeration class: Code: ...

85. IngresDialect mapping not correct?    forum.hibernate.org

86. is not mapped?    forum.hibernate.org

Newbie Joined: Mon Aug 01, 2005 12:40 pm Posts: 3 I am getting an error that my table in the database is not mapped. It is strange becuase I can see in the log that is is mapping the class to the table. The tablename is "candidate" adn the class is "CandidateDTO" here is the output to the log. [exec] 12:32:48,443 ...

87. Referencing an interface in a mapped Set    forum.hibernate.org

Explanation at bottom... Hibernate version: 3.0.5 Mapping documents:

88. Many to many mapping    forum.hibernate.org

As far as I know, you need to create the many-to-many table to have any sort of many-to-many attributes. I also generally create a mapping in the XML and generate a POJO, though I'm not sure if this is necessary. A two-column table with composite keys works (I've had issues trying to use tables with other columns, or with other primary ...

89. simple mapping problem    forum.hibernate.org

90. Mapping dilemma    forum.hibernate.org

Thanks, Preston. 1. Christian, how would you map this, if is a bad choice? I too had the impression that wasn't a bad choice based on the hibernate reference. 2. Also, is using createQuery with HQL as demonstrated in the Weblog sample application (also, in hibernate 3 reference), a good design? If you just need all rows back, won't ...

91. Many-to-many mapping concepts    forum.hibernate.org

Hi all, Im new to Hibernate- had a conceptual question about many-to-many bidirectional mappings with link tables.I have looked at documentation and also in a couple of books but have been unable to figure something out. Please consider this situation(from the CaveatEmptor example): Categories and Items have a many-to-many relationship which is represented in a link table.Collections of either are present ...

92. This mapping problem is defeating me    forum.hibernate.org

I was able to accomplish my goal using a combination of and . Here is an example (I can't be bothered to foo-bar-bazify it) Code: (select r.RELEASE_ID, ...

94. mapping    forum.hibernate.org

Here's one way, I think. Though with Set, not a Vector. You may use Set, List, Map. See the reference for more options. Code: ...

95. many-to-many mapping to same class    forum.hibernate.org

Hi guys, this is my first post on the forum so please forgive me if my question has already been answered. I've searched the forums, online doco etc, and still can't find a solution for what I'm trying to do. I'm using hibernate 2.1, with mySql 4.01 and java1.4.2_08 I want to create a many-to-many mapping from a class to itself. ...

96. Mapping...doubt    forum.hibernate.org

Hello all, Is it possible to map multiple tables using one class. All the tables are having identical structure.(same columns and keys) Only one will be present while starting the program for first time. Others are need to be added runtime. If possible,plz let me know how??? Thanks & Regards Jijo Vincent

97. Mapping Issue    forum.hibernate.org

...

98. Map what?    forum.hibernate.org

Hi, I don't want to be mean to Hibernate users, but I really cannot understand how anyone can map object with relation. It doesn't make sense. It should be objects HAVE relations, and the relations can be described and maintained by SQL. Therefore, it seems to me Hibernate is pointless. So all the fuss is just for persistency, and let's see ...

99. how to map    forum.hibernate.org

I have two classes namely User and Role. There is many-to-many relation between them. class User { String name; String surname; Set roles; } class Role { String name; } I want to keep this relation, between User and Role, in a different table. user id name surname 1 xxx yyy 2 zzz www role id name 1 aaa 2 bbb ...

100. Hibernate Mapping Hell    forum.hibernate.org

All, I am pulling my hair out over this one! COMPANY <1--*> COMPANY_MODULE_ASSOC <*--*> MODULE <1--*> PAGE COMPANY_MODULE_ASSOC is not just a join table, it has an extra field called "enabled". I went with the recomendations located here: http://www.hibernate.org/hib_docs/reference/en/html/components.html and created a CompanyModuleAssoc class and mapped the above relationship like this: Code: