subclass 3 « Map « JPA Q&A





1. How to persist a class that has subclasses?    forum.hibernate.org

Author Message nerotnt Post subject: How to persist a class that has subclasses? Posted: Mon Feb 02, 2004 10:44 am Pro Joined: Wed Oct 08, 2003 10:31 am Posts: 247 I'm trying to use a framework that I found recently. In the DB I have the ACTOR table. My problem is how do I associate the two subclasses (GroupImpl ...

2. Subclass mapping with different properties on SAME ROW    forum.hibernate.org

Hi All, I am, very, new to this, but I'll give it a go. I've been trying to setup a mapping for an existing table. The table has a bunch of properties of which I only want to retreieve a certain subset of them. I have this working fine, I have a mapped class, a config file and a test rig. ...

3. When and How to use ?    forum.hibernate.org

I read online docs chapter 5.1. Mapping declaration. I do not know when and how to use subclass. In the example of this chapter, I have some questions. If I add tag in tag, must put a tag ? In , column="subclass", "subclass" is a column name exist in db table? Does it mean when value ...

4. Subclassing problem    forum.hibernate.org

Newbie Joined: Wed Nov 12, 2003 3:45 pm Posts: 8 I beg of you, elucidation. Code: public abstract class AbstractAction extends PersistedObject { private Date date; private User user; public Date getDate() { return date; } ...

5. joined-subclass best practice    forum.hibernate.org

Beginner Joined: Wed Oct 29, 2003 11:52 am Posts: 37 Location: Gothenburg, Sweden I'm seeking advice for how to load joined-subclasses where the reference is reversed and located in the subclass table. The situation: A student network is modeled in the database by following tables (there are more): Code: -- Computers TABLE Computers (id SERIAL PRIMARY KEY, hostname VARCHAR); -- Outlets ...

6. replacing one persistent subclass instance with another    forum.hibernate.org

Hi guys, having some trouble figuring out the best way to handle a situation. I've got a parent Form object which contains a bunch of Field children. Field is an abstract class, there are a number of concrete subclasses, e.g. NumberFormat, DateField, TextField, etc. I'm using the discriminator column style of subclass mapping, and it works quite nicely. I now need ...

7. Joined subclass and primary foreign keys    forum.hibernate.org

My problem is that I have an identifying relationship in a subclass... so, as it is a subclass, it has and id (used to make the joins in the superclasses), but i have primary foreing keys that comes from the identifying relationship, if it were UNidentifying, ok, I would have a normal collection, but it isn't, the foreign key should be ...

8. One-to-many relationship in a joined-subclass?    forum.hibernate.org

This seems to be a basic question to me, but I read the reference documentation several times, the FAQs, and searched past topics. I've learned a lot, but I still haven't found what I'm looking for. I have a base class A with a joined-subclass B. Class B has a one-to-many relationship with class C. The primary key in Class B ...

9. subclass within a joined-subclass (mixed strategy)    forum.hibernate.org

hello, is it possible for joined-subclass (subclass per table strategy) to contain a subclass? The outline of my problem is that I have three classes, A, B and C. C extends B and B enxtends A. My tables are T_A and T_B. I'm trying to do the following: Code: ...





10. Mapping subclasses with out discriminator or seperate table?    forum.hibernate.org

Hi all, I have a class ProductGroup and two subclasses, ProteinProductGroup and BioToolProductGroup.. The only difference is that I want to map a set of products differently for each subclass using a differnt primary key. I could just copy the .hbm.xml for ProductGroup into each subclasses mapping file, but that seems wrong. Here is what I tried: Code:

11. caching subclasses only    forum.hibernate.org

not sure you did understand my question. I have the following class-tree: Party <- Organization <- Company (of course only a small fraction of the tree) i only want to cache companies but not all kind of parties. when i specify in my hibernate.cfg.xml, i get an exception telling me that only root class caching is allowed ! ...

12. joined-subclass question with the "class" property    forum.hibernate.org

Beginner Joined: Tue Jan 27, 2004 2:14 pm Posts: 40 Location: Atlanta, GA, USA I have an AbstractFish object with two joined subclasses Shark and Trout. See the mapping below. (Note: these are just test classes. :) When I run the following HQL query.... from AbstractFish f where f.id = 1 ...everything works out fine, so I am fairly confident that ...

13. using discriminator with joined-subclass    forum.hibernate.org

Is there anyway to use a discriminator with a joined subclass? In our situation, we have a poorly designed legacy schema, where each flavor of our base domain object has it's unique properties in their own table. For example, we have a Automobile table and then a Car and Truck table. The Automobile table holds the common properties, and the Car ...

14. Subclass mapping problem    forum.hibernate.org

Author Message vsanta Post subject: Subclass mapping problem Posted: Fri Feb 20, 2004 12:14 pm Beginner Joined: Mon Jan 12, 2004 3:39 pm Posts: 23 Hello everyone, I'm trying to map a class and it's subclasses. above is my hbm file. The superclass(Contrato) has in it's key a key to another object (Seguradora). When I add the hbm with ...

15. hibernate, xDoclet and subclass    forum.hibernate.org

Event.java: * @hibernate.class * table="EVENT_LOG" * polymorphism="implicit" * * // Not fully-qualified! * @hibernate.discriminator * column="EVENT_TYPE" * type="string" * length="64" * * */ public abstract class Event implements Serializable { with some columns and an ...

16. table-per-subclass strategy, Renaming the Key in subtable?    forum.hibernate.org

Hi, i've got the following mapping (sorry for the fake lame names...) Code: ...





17. subclass problem / no persistent classes    forum.hibernate.org

since we've declared subclass-mapping in it's own file, our selects over those objects failed. mapping of subclass:

18. Working with subclasses    forum.hibernate.org

Hi guys, my first post with a simple question (i hope so! :)) Look at this HQL: select obj.someclass.otherclass.atribute1 from obj in class anyclass the problem is: "someclass" is a class that has two extensions, "someclass1" and "someclass2" so "someclass" can be a "someclass1" or "someclass2" and otherclass just exists in "someclass2" so it gives an error when "someclass" is an ...

19. Association to subclass -> property-ref not found    forum.hibernate.org

Newbie Joined: Tue Feb 17, 2004 2:51 pm Posts: 10 Hello, First of all, thanks for this truly impressive product! Now, over to a problem which I tried to overcome most of yesterday.. I have a table-per-class hierarchy mapping with a superclass and a subclass. In addition I have a third table/class which I want to associate to the subclass. It ...

20. Lazy initializing object graph with varying subclasses    forum.hibernate.org

I have a need to read a complete object graph starting from a certain class. (including lazy collections) I do need to use lazy collections, as loading the entire object graph is not the normal behavior of the application. As an example, let's say that I want to load an Office object. The Office class contains a collection of employees that ...

21. ORACLE LONG and joined-subclass problem    forum.hibernate.org

Newbie Joined: Fri Mar 05, 2004 8:55 am Posts: 19 -hibernate 2.1.2 (DEBUG level) -oracle 8i sorry for my poor English... Hello, I have a problem with Oracle LONG column and joined-subclass: ---------------------------------- DATABASE script ---------------------------------- alter table DOSSIER_WEB drop constraint FK3FB03BA0217F38D0; drop table DOSSIER cascade constraints; drop table DOSSIER_WEB cascade constraints; create table DOSSIER ( ID NUMBER(10,0) not null, LABEL ...

22. Why not have a subclass in a joined-subclass?    forum.hibernate.org

23. Descriminator, subclass and "Repeated column in mapping    forum.hibernate.org

Using Hibernate 2.1.2 Looked at http://forum.hibernate.org/viewtopic.ph ... ass+insert and got scared .... :-) I have a class "Service" and it has column "SERVICE_KIND" if the value of SERVICE_KIND='operstor' I would like a new class representing this. Classic example of subclass .. .I thought .... Doing:

24. join-subclass + key-many-to-one problem    forum.hibernate.org

Hi, I'm using Hibernate 2.0 and tried something like foloowing ... Code: ... ...

25. Reference 1:n to another subclass of superclass problem    forum.hibernate.org

I'm using Hibernate 2.0.1 and McKoi 1.0 I have problems with a one-to-many reference of a subclass referencing another subclass of the same superclass. The following mapping define a class called BaseItem. It has two ubclasses that extends the functionality of BaseItem. The ArrayItem subclass contains a one-to-many association with the Item subclass. [code] ...

26. Subclass referencing other subclass of superclass problem    forum.hibernate.org

Newbie Joined: Thu Oct 09, 2003 4:30 am Posts: 7 I'm using Hibernate 2.0.1 with McKoi 1.0 I have problems with a one-to-many reference of a subclass referencing another subclass of the same superclass. The following mapping define a class called BaseItem. It has two subclasses that extends the functionality of BaseItem. The ArrayItem subclass contains a one-to-many association with the ...

27. Query mapped to wrong table with one table per subclass    forum.hibernate.org

Author Message pierre-yves Post subject: Query mapped to wrong table with one table per subclass Posted: Thu Mar 11, 2004 11:21 am Newbie Joined: Thu Nov 13, 2003 12:03 pm Posts: 18 Location: France Using hibernate 2.0.3 I have a mapping with a one table per sublass strategy. Code:

28. updating referenced subclass not working    forum.hibernate.org

Newbie Joined: Thu Oct 09, 2003 4:30 am Posts: 7 I'm using Hibernate 2.1 and McKoi 1.0.2. Problem: null values in referenced subclass. Please read the following for a full description. The following mapping represents a Device that has a one-to-many relationship with BaseItem. BaseItem has two subclasses Item and ArrayItem. The ArrayItem has a one-to-many relationship with its sibbling subclass ...

29. many-to-one relationships with subclasses    forum.hibernate.org

I'm sure I am missing something in the documentation to solve this problem but I need a push in the right direction. At this juncture, I seem to have part of the problem licked but not all... more on the exact problem after setting the context. I have a class that has multiple sub-classes. I want to create a class that ...

31. Association to Subclass, supported?    forum.hibernate.org

32. Using Interfaces and for implementations    forum.hibernate.org

I have a similar design and am having similar issues. I have implemented a class-per-table strategy, but there's quite a bit of collective information (ID generation, Lifecycle code) that's common to all the implementing classes. Code: public interface DBEntity extends Lifecycle { public abstract Integer getId(); private abstract void setId(Integer id); /** blah blah bla ...

33. HQL: Searching on a subclass property    forum.hibernate.org

Here are my constraints: 1. I cannot change the database schema (I wish I could) 2. I have the following class hiearchy Item is a class Item.sku is a property of Item Staple is a joined-subclass of Item Staple.description is a property of Staple Pack is a joined-subclass of Item Pack.description is a property of Pack Notice that because of the ...

34. Subclasses and ClassCastException    forum.hibernate.org

Hi all! I'm trying to save a Subclass but I'm getting a ClassCastException. these are my classes: Code: public class Tariff implements Serializable { private ClientType clientType; private Calendar fromDate; private String name; private Double markUp; //getters, setters, equals(), hashCode()... } public class CommissionableTariff extends Tariff { ...

35. Mixing Joined-Subclass and Subclass on different levels?    forum.hibernate.org

Hello. I am trying to implements a mixed joined-subclass and subclass inheritance diagram. The reason I want to do that for is that I have a number of root classes that define little or no persistant fields, but I have a couple of child classes that have a lot of information. Code: ...

36. Inheritance, subclass or joined-subclass sample code please    forum.hibernate.org

Help please. Would someone please provide sample Java code demonstrating how to: 1. Create subclass (or joined-subclass) instances 2. Load a subclass (or joined-subclass) using the Hibernate API 3. Save a subclass and therefore the parent class too 3. Explain where in the Java code would I use the discriminator-value to tell Hibernate which of the subclasses I would like to ...

37. Insert into database with joined-subclass    forum.hibernate.org

Hi all, I have two classes, Bloqueio that extends Periodo. I am using jsp pages to insert data in my database. I configure hibernate to use joined-subclass, but I have a message: net.sf.hibernate.JDBCException: could not insert: [com.gfmi.delivery.wms.agendamento.Periodo#1] My hbm file: Code:

38. Using joined-subclass, and inheritance - Help -    forum.hibernate.org

I am trying to write a sample app that uses the joined-subclass feature in hibernate. I am using the Payment sample from the documentation. Here is the declaration: ...

39. filter, many-to-many association and table-per-subclass    forum.hibernate.org

I'm having problems using filter and many-to-many association. Let me explain: I have superclass A, and A has an auto many-to-many lazy relationship. So I has the two accessors: Set getAs(); and void setAs(Set as); But I also have several joined-subclasses of A, let's call them B, C, D. I can add Bs to Cs, etc... b.getAs().add(c); b.getAs().add(d); When I have ...

40. joined-subclass collections    forum.hibernate.org

I have a class Decision that has a one-to-many relationship with another object, DecisionParty. Each of these objects map to their own table. The persisting of these objects is working fine. I then created DecisionPartyA and DecisionPartyS, both subclasses of DecisionParty. Because both of these classes also have their own table, I've mapped them as joined-subclasses (of DecisionParty). Each Decision that ...

41. Joined-subclass retrieval and scaling    forum.hibernate.org

42. HQL: is it possible to select by subclass type?    forum.hibernate.org

43. Problem with Hibernate.initialize and subclass    forum.hibernate.org

I have a simple hiearchy where a Person object may have a Customer subclass. One of my objects stores a proxy to a Person, but the current actual entity should be a Customer. Some of my colleagues has put a Hibernate.initialize( person ) in the code, and this explodes with a cglib error on one of the properties. Closely following what ...

44. Mapping joined-subclass    forum.hibernate.org

As I understand the (excellent!) Hibernate docs, to do a joined-subclass mapping (table-per-subclass mapping), I have to put the entire subclass mapping info inside the parent class mapping file in a joined-subclass element. This isn't just the subclass name, table, and key, but all the subclass properties, too. When using a common, persistent base class ancestor that handles all the shadow ...

45. joined-subclasses    forum.hibernate.org

Code: ...

46. Reading persisted subclass (in)correctly    forum.hibernate.org

Good day! We have a serious problem using Hibernate. The case is that we have a Role that is played by a Party. The method call getPlayedBy() on Role results in a (subclass) of Party. The Party-class is subclassed into several classes (including Role itself) differing extraordinary in the amount and sort of attributes. We succeeded in storing the Role and ...

47. one-to-one mapping and joined subclasses    forum.hibernate.org

I've run into problems with my mappings and a mapping from one class to another class (which is mapped using a joined-subclass). Mapping for class A: Code:

48. Change the subclass of a persistent entity: is it possible?    forum.hibernate.org

I know this doesn't make much sense but... is it possible to change the subclass type of an entity? I.e.: can I manually change the value of the discriminator in the line for that entity? I tried creating a new instance and setting it the id of the object I want to replace, but since I previously needed to load the ...

49. Morphing between subclasses    forum.hibernate.org

I have a situation where I want to do something similar to subclasses. But I am not sure how Hibernate behaves when the discriminator value changes. Main class: QueuedCommand Sub class A : RawCommand Sub class B : InterpretedCommand Sub class C : ProcessedCommand What I essentially do is to have a serverside process which takes RawCommands and produces InterpretedCommands, takes ...

50. Extra column in subclass    forum.hibernate.org

51. discriminator with parrallel subclasses problem    forum.hibernate.org

Author Message MarcusZ Post subject: discriminator with parrallel subclasses problem Posted: Sun May 09, 2004 11:16 pm Newbie Joined: Fri May 07, 2004 2:18 am Posts: 19 Hello I cannot figure this out. I have 2 base classes each with 2 subclasses like this Parent Parent1 extends Parent Parent2 extends Parent and Child Child1 extends Child Child2 extends Child ...

52. Problem with subclasses and persistence ordering    forum.hibernate.org

Newbie Joined: Mon Feb 09, 2004 10:00 pm Posts: 15 I have created an object hierarchy for auditing that has the class Audit as an abstract superclass. Subclasses extend Audit and one such subclass is JPProjectAudit. I am using a single table to hold all of the Audit records and use the name of the subclass as the discriminator. The audit ...

53. building query on joined-subclass mapping    forum.hibernate.org

Hi everyone, I've got the following mapped table: Code: ...

54. classnotfound exception while using subclass inheritance    forum.hibernate.org

i'm trying to persist several implementations of ProfilePermission interface in one table.. my map file looks like this: do i need a mapping file for each of the subtypes? i'm getting: net.sf.hibernate.MappingException: persistent class [CountryPermission] not ...

55. can't delete joined-subclass objects from database    forum.hibernate.org

My first message here. Congratulations for this great project! :D But also, I have a problem with it :p. I can't remove a kind of objects from the database. I have the folowing mapping for a class (with its subclasses) Code: ...

56. joined-subclass, ClassCastException w/ Querying Descendants    forum.hibernate.org

Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message RyanNorris Post subject: joined-subclass, ClassCastException w/ Querying Descendants Posted: Wed Jun 09, 2004 3:16 pm Newbie Joined: Wed Jun 09, 2004 2:25 pm Posts: 1 I have two joined-subclasses as part of a data model like ...

57. Discriminators not used when pulling subclasses?    forum.hibernate.org

Ok, apologies, just re-read your problem, so ignore my first answer. It doesn't need to use the descriminator as it knows what type of class it is retrieving - it only needs to query against the descriminator if it doesn't know the exact class type that it's retrieving. i.e. if you'd followed my first answer, then it would use the descriminator ...

58. simulate within     forum.hibernate.org

my Problem is that I cannot place a subclass into a joined-subclass. Any adea How I can solve my problem. I've read about , but cannot figure out if it can help, and how. thanks Code: class A { String id; } class AA extends A { } class BA extends A { } abstract class CA extends ...

59. Map of subclasses keyed by property of superclass fails    forum.hibernate.org

Problemdescription: Schemageneration (wrongly?) enforces a property declared on a superclass on a subclass when the subclass i used in a map keyed on the superclasses parent (pheew!). Look below for example mapping that fails. Why does schema generation add the name column to UglyCat? If I create an UglyCat and save it, all look fine (name gets saved on row in ...

61. many-to-one relationship from a joined-subclass possible?    forum.hibernate.org

Usuf Arif: uarif@tiaa-cref.org I have posted this two days ago, but no replies yet, may be I did not explain it properly. Will try again. We have a scenario where Child extends Parent and Child has many-to-one relationship with another table. When I try to insert a Child, hibernate complains that it can not insert null value in the foreign key ...

62. createCriteria for subclass's property supported?    forum.hibernate.org

Hi, I have a class S which has subclasses S1, S2. In S1, there is a property p1 which does not exist in S1. The I want to use p1 as criterion, but thee will be error message like net.sf.hibernate.QueryException: could not resolve property: p of: S. My code is like the following: sCriteria.createCriteria("p1"); // here error happens Regards, Rice

63. can't map to a table    forum.hibernate.org

Hi, what i would like is to have the functionality provided by the mapping, but where the properties defined for each subclass are specified in different tables. For example: Table MICROCHIPPED_CAT extends Table CAT Table MICROCHIPPED_CAT has the property MICROCHIP_TAG_ID I would like to define hibernate mappings for both tables, and then within the CAT table use

64. table-per-subclass mapping save/update problem    forum.hibernate.org

I have a problem when using the table-per-subclass mapping strategy. I have a class Parent and a class Child. The Child class is a subclass of Parent. In the Parent's mapping file, Child is defined as a joined-subclass. There is no other relationship defined between the Parent and Child. There is a case in my application that a Parent record will ...

65. Automatic Primary Key Generation for subclasses.    forum.hibernate.org

Hi all, I have a small doubt in inheritance mapping particularly "table per subclass" strategy described in hibernate guide Chap16 (Inheritance Mappings). It seems subclass need to generate primary key manually and map it as a property as tag doesnt allow element. Is it so? Please suggest me if there is any other way so that it can be ...

66.     forum.hibernate.org

I ran across this element while peeking in the DTD for hibernate2.2 / hibernate3. Just from the comments surrounding it in the DTD, it sounds like it could be useful to me in mapping some legacy date. However, I could not find any mention of it in the reference docs. Assuming that documentation exists for this new element, where should I ...

67. Collections, cascade, subclasses    forum.hibernate.org

68. Modifying subclass's discriminator value on update    forum.hibernate.org

Hi, I am having difficulty performing updates on some persisted objects. In my situation, I have an abstract class(call it "Animal") which is extended by three concrete classes(call them "Cat", "Dog", and "Horse"). Niether Cat, Dog, nor Horse contain any fields of their own; the only thing that differs between them and Animal is the functionality of their methods. The hbm ...

69. filtering collection based on subclass...    forum.hibernate.org

70. Joined-subclass inheritance with xdoclet    forum.hibernate.org

Hi, I am unable to generate the proper configuration files using xdoclet for inheritance (joined-subclass). I have a class Person which inherits ContactInfo and I want to have the following mapping in my ContactInfo.hbm.xml: ... ... ... I therefore add the ...

71. Subclassing by where    forum.hibernate.org

I was trying to figure out why subclassing is not based in a free where clause instead of discriminator column. Noboy ever thinked on it ? Or it involves too many complications ? This would apply to collections too, instead of discriminator column (or worse documented UserTypes, god knows how it works, and it still bounded to the columns of ...

72. Sub-classing a joined-subclass    forum.hibernate.org

/** * @since 18/07/2004 * @version 0.1 * * @hibernate.class discriminator-value="U" * proxy="br.ufpe.scacin.model.People" * table="SCACIN_PEOPLE" */ public class People implements Identifiable {...}

73. joined-subclass and IDENTITY_INSERT    forum.hibernate.org

Hi all, i try to insert into a joined-subclass table on MS-SQL-Server with identifiers of type 'identity' . Mapping Code: ...

74. Table-Per-Subclass and Extra ManyToOne Column    forum.hibernate.org

... ...

75. 1-to-1 mappings and subclassing    forum.hibernate.org

Newbie Joined: Mon Jul 19, 2004 3:34 pm Posts: 4 I would appreciate help on a few related items - I've read the reference and many posts prior to writing this, but am unclear on a few things. Here's my scenario: I have a House class mapped to table HOUSE, and 2 properties: CoOwner and PrimaryOwner. PrimaryOwner extends Owner (the base ...

76. Custom Persister with a Joined Subclass    forum.hibernate.org

Hi, How do I go about specifying a custom persister for class that has a joined subclass? Below is my mapping. I would like the class UserId and the joined subclass UserLogin to use the same custom entity persister I've written. Anyone know how to do this without getting the discriminator not being set warning? (Incidentally, I tried adding a discriminator ...

77. 1:M relationship to a subclass    forum.hibernate.org

Regular Joined: Wed Jul 07, 2004 2:00 pm Posts: 64 I have a 1:M relationship, and the class on the M side is mapped as a subclass. For this particular relationship, I only want the specified class returned on the M side. Unfortunately, Hibernate does not seem to include the discriminator value in the query when it is retrieving the related ...

78. Subclass Mapping and Cartesian product on postgres    forum.hibernate.org

gavin wrote: I don't understand the problem. Looks perfect to me. Hey Gavin! Sorry for the delay. Yesterday I was in Hamburg so I haven't the chance to test again and reply. The problem IHMO has to do with inheritance and joined subclass mapping here. Drugstore is a subclass of Customer and the attributes used in the query refer to the ...

79. many-to-one on same column in subclass    forum.hibernate.org

A, B, C, D are classes B extends A the A,B hierarchy is mapped on the same table T I have two many-to-one relations on the same column of T in the classes from A and B as below. A M------to----- 1 C B M------to------1 D Hibernate is complaining about a double mapping. Is there any way of modelling these relations? ...

80. using collection filter with joined-subclass mapping    forum.hibernate.org

I am posting again as my previous query did not get any response. Hopefully I am clearer this time: I am using hibernate-2.1 with joined-subclass mapping I have 3 classes BaseAttributes, DerivedAttributes1 and DerivedAttributes2 BaseAttributes{ int baseAttribute; } DerivedAttributes1 extends BaseAttributes{ int attribute1; } DerivedAttributes2extends BaseAttributes{ int attribute2; } I have a Employee Class as shown Employee{ Set attributes } mapping ...

81. One-to-one in conjunction with joined-subclass    forum.hibernate.org

I'd greatly appreciate mapping advice on this; despite re-readings of the Hibernate literature and forums, I'm not grokking this one. It's very simple, but apparently so am I. I have a Loan class with properties of type PrimaryApplicant and CoApplicant. Both PrimaryApplicant and CoApplicant extend Applicant. (primaryApplicant is required, coApplicant is optional.) Now the question: how do I use joined-subclass (my ...

82. Table per subclass inheritance mapping    forum.hibernate.org

I am having trouble trying to understand the 'Table per subclass' inheritance mapping. Chapter 3 of the Hibernate in action book states that "no discriminator is required with this stratergy" yet I can't get the Hibernate Session to load up if my mapping file does not contain the 'discriminator' tag. I get the error message [i]"Hibernate Exception occured building SessionFactory: discriminator ...

83. joined-subclass hsql    forum.hibernate.org

right thanks. I was going to use named queries from my mapping files like from FreightHub as hub where hub.class = :subclass and hub.region = :region i guess ill just have to duplicate my named queries for each subclass or come up with a better idea :) thanks for the quick reply Simon

84. Arrays with elements part of joined-subclass mapping    forum.hibernate.org

Hi All, I have a mapping of a class with an an array element. The SQL inserts all seem correct, but I notice Hibernate subsequently does some SQL updates to the values stored in the table holding the array values for the purpose of setting the index values. The updates for the index columns look correct, but the update statement seems ...

85. How to match on subclass specific field with query criteria?    forum.hibernate.org

... properties ... ... properties ...

86. mix subclass and joined-subclass    forum.hibernate.org

hi, is there any way to mix and in one mapping file? i have the following class hierachy: class item{ ... } class asset extends item{ ... } class mobile extends asset{ ... } now, objects of class item and class asset should be stored in one table. therefore i used the subclass tag. ==== item.hbm.xml======= ...

87. subclass or joined subclass or...    forum.hibernate.org

Hibernate version: 2.1 Name and version of the database you are using: mysql 4.0.16 I have been using Tom Sedge's excellent documentation on Index of Relationships and have been having great success. But now I stumble onto something I need a little guidance on. It seems to fall somewhere in the realm of subclass or joined subclass. I have a baseclass ...

88. Limit caching to specific subclass?    forum.hibernate.org

89. Subclasss of subclasses all with 1 discriminator    forum.hibernate.org

90. joined-subclass and custom persister    forum.hibernate.org

Hibernate version: 2.1 We have a custom Persister that all of our mapping files use. Everything works fine except for when we map the table per subclass inheritance mapping. Then we get the following error. If I remove the custom Persister from the mapping file, then it works fine. Is there an anything special we need to do with the Persister ...

91. Hibernate not retrieving correct discriminator subclasses    forum.hibernate.org

My mapping file is as below: ... I followed one of the examples somewhere but i cant seem to retrieve the correct subclass i can ...

92. create an row of a subclass when a row in baseclass exists??    forum.hibernate.org

Hi, I have a base class User and a sub class SuperUser that are mapped to tables TBL_USER and TBL_SUPER_USER using table per subclass stradegy. My problem is that I can't find a way to "upgrade" a User object to a SuperUser object. In other words, When a User object already exists in the database, how can I create a row ...

93. 2nd level cache and subclasses    forum.hibernate.org

Hello! I am trying to figure out how the second level cache handles subclasses. I was a bit surprised that the -attribute is only allowed for -entries but not for e.g. entries. I did search the forum without finding an answer why this is not allowed. But i guess there's a good reason for it which i did not see ...

94. ways to map a subclass within a subclass    forum.hibernate.org

I have a general question and a specific one: The general question is: I'm working with a class hierarchy: ClassA<--ClassB<--ClassC, for example, it can be a Person<--Employee<--Manager hierarchy. I wonder what is the best practice for mapping such a class hierarchy using Hibernate. The specific question is: I've tried to map the class hierarchy using the table-per-class-hierarchy strategy, but I'd want ...

95. Is there any benefit using subclass?    forum.hibernate.org

96. Problem with a ont-to-many association in a subClass    forum.hibernate.org

Hibernate version:2.1.4 I'have a BeanCittadino therefore:

97. Could not insert into joint subclass    forum.hibernate.org

Hi, I'm facing a problem where I'm not able to insert into the table which is joined subclass of a class and has the same primary key as the parent class. Parent class get the generated primary key and the same key should also be inseted into the child class. Could any one please help me out , as It's taking ...

98. Persisting Subclasses without State    forum.hibernate.org

We are automating generation of our persistence classes against an existing database schema. The results are value objects. We put our business logic in extensions of the generated classes. The extensions have no persisted state themselves and no associated table. However, those are the objects we instantiate. How do we persist the extensions? Leaning toward velocity script to generate one class ...

99. Joined subclasses with Firebird 1.0    forum.hibernate.org

100. Inheritance chains with joined-subclass    forum.hibernate.org

Hibernate version: 2.1.6 I have a situation where I have 3 classes in an inheritance chain. I have been using a table-per-subclass strategy for the rest of my application. In this case, I have to declare the base class with it's table and then map a joined-subclass of the last child with a second table. What I'd like to do is ...