subclass 6 « Map « JPA Q&A





1. "De-proxying" isn't leading to actual subclass    forum.hibernate.org

This is actually a "bug/design feature" in cglib. I ran into the same problem in my application and couldn't really come up with an elegant workaround. Other posters will tell you to create an interface that implements all the methods in all the subclasses in your heirarchy, effectively flattening your API into a single interface. To work around this design feature ...

2. Querying across joined-subclasses    forum.hibernate.org

3. Associations in subclass    forum.hibernate.org

4. joined subclasses, classcastexception and determine subclass    forum.hibernate.org

hi. pls need help with hibernate with joined subclasses. if i get object (PorC - is parent for person and company) directly using session.get() i can use instanceof to determine which object from joined subclasses it is (if person or company). but if i get to that object through relation e.g from address /mapped many to one/ i can get only ...

5. Joined Subclass problem    forum.hibernate.org

Hi We have developed program using Joined Subclass feature of hibernate. First Class: -------------------------- class Person{ String id; // this is primary key String name; get & set methods for both the properties } Second class: --------------------------- class Order extends Person{ String orderid, // this is primary key or Unique key String ordername; get & set methods for both the properties ...

6. Can i use a in a ?    forum.hibernate.org

I need to use a "table per class" aproach with discriminator values, so i'm using a sublass tag, but it doesn't suppor the use of a nested "set" tag. Looks like if you use this type of inheritance strategy, you can't use sets in your child classes. (is this ok ?) Any help please. Tnxs

7. Bug or my misuse of ?    forum.hibernate.org

...

8. Creating record in a table mapped to a joined-subclass    forum.hibernate.org

Author Message rdonasco Post subject: Creating record in a table mapped to a joined-subclass Posted: Mon Jan 16, 2006 3:04 am Newbie Joined: Wed Jan 11, 2006 5:21 am Posts: 14 Im using hibernate to store two types of User objects. The first one is the generic UserData, and the second one is a ReviewerData (Subclass of UserData with ...

9. Subclass hiding properties of parent class?    forum.hibernate.org

I'm using Hibernate 2.1.8, with XDoclet. I have a class, which I'll call Thing, and another class which extends it, which I'll call SubThing. I want to map each of these to their own table. SubThing does not have all the properties of Thing, so I want the SubThing table to have fewer columns. Now, as it is, when Hibernate updates ...





10. Object with id: was not of the specified subclass    forum.hibernate.org

Hibernate 3.0.5. I am doing a table-per-class hierarchy for a set of my classes. Everything seems to map fine, but if I have a collection of the base class type as a many-to-many set in another object the collection is pulled back as an arbitrary subclass type, not as the base class. An example is that I have a hierarchy of ...

11. table-per-class-hierarchy Subclass Substitution Mapping    forum.hibernate.org

Hibernate version: 3.1.1 In the following forum topic: http://forum.hibernate.org/viewtopic.php?t=950827, giulio.vezzelli asked about how to accomplish substitution of a base class by a subclass using table-per-class-hierarchy mapping definitions. I'm looking to do essentially the same thing. I'd like to define a mapping in my core product, then allow customizations of my product to define a mapping that extends and essentially ...

12. replacing one-to-many by join or subclass mapping    forum.hibernate.org

Hi all, I'm just wondering if it is possible to define a combined mapping for tables that are in a one-to-many relationship. What I mean is that I am having let's say a Product table and a ProductDescription table. A Product can have many descriptions and is identified by a productId. A productDescription is having a composite-id (id, country, language). What ...

13. Generated ddl causing problems with subclass?    forum.hibernate.org

I'm trying to represent a simple class heirarchy of: Expense -- LeaseExpense -- TennantExpense In this class heirarchy, the subclasses are used to determine which object the expense is applied to. To represent this I used the following code: Code: ... ... ...

14. DML Upate for joined subclass    forum.hibernate.org

15. Subclassing without discriminators (rather joins)    forum.hibernate.org

Hibernate version: 3.1.1 Mapping documents: Code: ....(more) ...

16. Mapping set based on joined-subclass superclass key column    forum.hibernate.org

Hello, I ran into a problem mapping a Set on a joined-subclass where I use a mapping key from its superclass. Here follows an example scenario: Example mapping: Code:





17. Exotic discriminator/subclassing problem? (updated)    forum.hibernate.org

UPDATE: Oddly enough, we are unable to reproduce the error in a JUnit testcase (running in Eclipse). It only occurs in a Tomcat environment, with all other circumstances equal. Could this be a class-loader problem? Hibernate version: 3.1.2 We have an exotic (legacy) database that uses an extensive table-per-subclass strategy, using discriminators. It involves a multi-level inheritance strategy, so bear with ...

18. Converting a persisted instance into a subclass    forum.hibernate.org

Hibernate version: 3.0.3 I'm using a table-per-class mapping strategy with some joined-subclasses, and I'd like to be able to convert an object into a subclass. I have an item persisted in my system as a generic type, and it is later converted into something more specific when a user reviews it and decides what it should be. I've tried a couple ...

19. Hibernate mapping (table per subclass) problem    forum.hibernate.org

Answer 1: Yes, but that's not giving you a bi-directoinal relationship. If you don't want one, then what you've got is good. Answer 2: If you want to find Headers that aren't joined to AssignedHeaders, you'll have to do that in your own code (load all Headers, drop results that implement AssignedHeader). It can be done using subclass instead of joined-subclass; ...

20. Querying from subclass class in joined-subclass    forum.hibernate.org

... .. I want to save only subclass from the above mapping,i don't want to save super class object.The keys are composite ...

21. How save a subclass with parent created    forum.hibernate.org

We take the following case: I have the class User with a lot of users registered, after (1 year after) I want to classify the users (the next and old users) like admin and common, then I need to create two subclasses from class User called AdminUser and CommonUser adding another attributes. Then, I would like to create AdminUser for an ...

23. Issue with joined-subclass    forum.hibernate.org

Hibernate version: 3.1 Mapping documents: Code: ...

24. Is there a way to get joined-subclass to user inner joins?    forum.hibernate.org

What happens if you change the class in subChildren's set to SubChild? That might generate an inner join. The way you have it at the moment, subChildren must be selected using a left outer join, because it contains instances of SuperChild: if you switched it to inner join, then you wouldn't get an non-subclassed SuperChilds.

25. Class inheritance: Two subclasses with same identifier    forum.hibernate.org

Beginner Joined: Wed Sep 07, 2005 9:57 am Posts: 20 3.0.5 Code: public abstract protected true ...

26. Not able to save a subclass    forum.hibernate.org

Hi There, My env is Hibernate 3.0.5 Postgres I am not sure whether this is a defect with Hibernate or this had to be handled differently. I have three classes MedicalHistory Code:

27. Converting a persisted object to an instance of a subclass    forum.hibernate.org

Author Message rmonie Post subject: Converting a persisted object to an instance of a subclass Posted: Tue Feb 28, 2006 6:44 am Newbie Joined: Tue May 24, 2005 7:08 pm Posts: 17 Location: Melbourne Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.1.2 Mapping documents: Code:

28. 2nd level caching of subclasses    forum.hibernate.org

Hi, I didn't see this addressed anywhere in the FAQ, nor could I find any other forum posts about this. Is there a technical or philosophical reason that declaring 2nd-level caching policy is not supported at the subclass level rather than only at the class level? I.e., it seems that hibernate, in the case of subclasses, knows it is looking for ...

29. retrieve super classes and not subclasses with criteria    forum.hibernate.org

I think there may be a logical problem in your Java inheritance hierarchy - from your question it looks like you have a non-abstract inner node in the inheritance hierarchy, which creates a lot of problems, including the one you're experiencing. The best way to deal with this issue is to make all inner classes of the hierarchy abstract, and derive ...

30. search/filter by subclass from a where clause    forum.hibernate.org

I've got a class (we'll call it Superclass) with 2 subclasses (we'll call these SubA and SubB) and they are mapped using Things are set up property but I can't do a search within a specific subclass. My hql looks like this: "from Superclass as superclass where ..." I need to filter by subclass within the where clause, ...

31. WrongClassException on joined-subclass @seeJIRA HHH-606    forum.hibernate.org

My question is very similar to the JIRA issue #HHH-606 http://opensource2.atlassian.com/projec ... se/HHH-606 And the stauts for the bug is closed, so I am not sure whether this has been fixed in the hibernate new release. Thanks a lot. Here are the details Hibernate version: Hibernate 3.0.5 Mapping documents: ...

33. Collection Overloading does not work for subclass mapping    forum.hibernate.org

Author Message mhelmstetter Post subject: Collection Overloading does not work for subclass mapping Posted: Wed Mar 15, 2006 10:11 am Newbie Joined: Fri Feb 06, 2004 1:37 pm Posts: 9 It seems that collection overloading does not work propery for table-per-class hierarchy mapping, or a least it is not working the way I want it to. Of course, this ...

34.  within not allowed?    forum.hibernate.org

I am trying to map a legacy data-model that, due to SQLServer2000 table size restrictions, splits a single entity into multiple tables with a shared key. The entity in question is also the child node of a polymorphic hierarchy (i.e Employee where Employee extends Person), which is mapped as a joined-subclass. It looks like I should be using the element ...

35. TODO-173, increment for union-subclass vs. blanks in names    forum.hibernate.org

Newbie Joined: Sun Mar 19, 2006 5:33 am Posts: 1 The following change to IncrementGenerator.java revision 1.11 date: 2005/04/26 06:37:53; author: oneovthafew; state: Exp; lines: +24 -5 TODO-173, increment for union-subclass SQL logging from id generators ---------------------------- seems to have broken this generator when used on tables with blanks in their names. This update tries to allow access to a comma-separated ...

36. discriminator formulas on subclass not possible?    forum.hibernate.org

I have a superclass with three subclasses. The discriminator value for each subclass is based on multiple values so I need to use the discriminator formula to define the multiple values. But this is only possible in the class mapping definition not on the subclass. So how do specify multiple values for the discriminator on my subclasses?

37.  problem with 3.1.{2,3}    forum.hibernate.org

Hi, I have the following mappings for a 'public abstract class Mob' and its subclass 'Sequence'. Somehow I can't seem to get this to fly with 3.1.{2,3}. Can somebody please comment? Thanks. from Sequence ...

38. Mapping class & subclass to same table without discrimin    forum.hibernate.org

(First, I'd like to Note that the only reason for this is to support legacy schema/code in our app) I have class A, which is a hibernate entity with generated primary keys. However, there is one case where the primary key actually needs to be assigned. For this, I create class B (which extends A), and override the primary key getter/setter, ...

39. joined-subclass with a discriminator column    forum.hibernate.org

Hibernate version: 3.0.5 So, I have a three tiered inheritance hierarchy: I start with base class A which has its own db table. Class B subclasses A, has its own db table, and is mapped using . Classes C and D subclass B, but have no additional fields and therefore do not need their own additional db tables. It makes sense ...

40. Is a join-subclass + discriminator possible?    forum.hibernate.org

I'm working with hibernate 3. I'll describe what I'd like to map. I'll go with the old shape analogy. I have a parent table shape. I have a child table circle. I'm using a join-subclass to model this part, and that seems fine. However, there are different types of circles, lets say there are red and yellow cirlces. At the end ...

41. Bug: subclass contains collection of sibling subclass    forum.hibernate.org

Author Message mhelmstetter Post subject: Bug: subclass contains collection of sibling subclass Posted: Wed Apr 12, 2006 10:44 am Newbie Joined: Fri Feb 06, 2004 1:37 pm Posts: 9 If a map a subclass that contains a bag of sibling subclasses, I get a ClassCastException. Debugging this it appears that someow the CollectionEntry key is being initialized to the ...

42. Bidir. associations with join table and joined-subclass    forum.hibernate.org

Hi, i'm evaluating Hibernate to provide an O/R mapping onto a legacy database. I followed the examples provided in section 7.5.1 of Hibernate 3.1.x documentation: "Bidirectional associations with join tables". The one-to-one example, with Person and Adddress connected by a bidirectional association mapped on a join table (PersonAddress), works fine. The same for the many-to-one association mapped on a join table. ...

43. Criteria Query accross multiple subclasses    forum.hibernate.org

Hello all, I've got an advanced search form going on, and therefore am trying to employe the Criteria API to meet my requirements. I'm working with an inheritance hierachy mapped with a discriminator, each subclass having it's own table. For the purposes of this question lets say it's a Document document hierachy... I've got a Document parent class... and then there ...

44. How to get only super class in table-per-subclass strategy?    forum.hibernate.org

Author Message wetrull Post subject: How to get only super class in table-per-subclass strategy? Posted: Tue Apr 18, 2006 3:29 pm Newbie Joined: Tue Apr 18, 2006 2:50 pm Posts: 10 Location: San Diego, CA, USA I'm trying to get instances of the super class in a "table per subclass" inheritance mapping strategy but have not been successful. My ...

45. Howto persist a class as a subclass    forum.hibernate.org

I have a simple class hierarchy. class Resource; class Staff extends Resource; class Coordinator extends Staff; The corresponding tables are: RESOURCE STAFF COORDINATOR They join by primary key. A Resource is a perspective Staff member, and a Staff member could become a Coordinator, but the subclasses all share the same information provided by the superclass, Resource. My question is this. Once ...

46. Change a superclass to a subclass using joined-subclas(xdocl    forum.hibernate.org

I have a joined-subclass where I want to "upgrade" the superclass to the subclass. I cannot delete the superclass because of constaints and I also cannot evict the superclass and persist the subclass because the subclass is in the database already One solution is to update using plain sql, but the sql is never commited. I can see that posgres is ...

47. WrongClassException:Object ... not of the specified subclass    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version:3 Mapping documents: One Abstract Class "Step" is mapped with 2 concrete subclasses :"StepEai" and "StepSap" : ... here come some properties ... ...

48. Unable to map subclass with collection using discriminator    forum.hibernate.org

I need to map a subclass based on a discriminator value, containing a collection and cannot find a way to do this. I need to use method 9.1.4 from the hibernate docs to implment the inhertence, since the parent class has some info in a table, with a discriminator indicating the subclass type. My problem is that I cannot map the ...

49. join and joined-subclass    forum.hibernate.org

Hi i am using Hibernate version 3 Here is my mapping file. hibernate-mapping> I am getting the following error Caused by: org.xml.sax.SAXParseException: The content ...

50. Subclass within subclass    forum.hibernate.org

Hibernate version: 3.1.2 Mapping documents: SQ_PESSOA

51. Filters and subclasses    forum.hibernate.org

tenwit wrote: Is the combination of a filter on the superclass plus the subclass discriminator not fine-grained enough? What is it that you're trying to do that can't be done with those two features? I have a similar issue; following is the example... We would like to create jBPM TaskInstanceS that have an association to one of our Organization entities. As ...

52. Joined Subclass Example    forum.hibernate.org

The examples in the Hibernate documentation and every example I can find for joined subclasses either shows subclasses with trivial properties or subclasses whose contents are listed as "...". I'm having a really hard time polymorphizing some classes I wrote that worked fine as normal classes (problems with keys, columns and null values depending on which thing I tweak). I don't ...

53. Joined subclasses - "Too many tables" with MySQL    forum.hibernate.org

Author Message r0bh Post subject: Joined subclasses - "Too many tables" with MySQL Posted: Wed May 17, 2006 12:03 pm Newbie Joined: Fri Sep 16, 2005 8:05 am Posts: 7 Hi all, I'm getting a curious exception whilst trying to lazy load an object. The exception (full details below) is org.hibernate.exception.GenericJDBCException: could not load an entity: [org.psygrid.data.model.hibernate.Persistent#591] ... Caused ...

54. Error when fetching collection of subclass    forum.hibernate.org

Hi, I am combining table-per-class inheritance and table-per-class-hierarchy inheritance as follows:

55. Subclass mapping    forum.hibernate.org

56. PropertyValueException with joined-subclass    forum.hibernate.org

57. Need ideas for subclass with collection mapping    forum.hibernate.org

Hi, I'm trying to map a small business object structure to hibernate. I got a bill-class and a abstract product class with product subclasses for every product-type. The bill has a collection of products and every product subclass has a collection for specific product items. Has anybody an idea for writing the mapping-file? Thanks in advance, Thomas

59. Legacy code mapping using subclass-join    forum.hibernate.org

On my current project I have to map old -badly designed- legacy tables. I want to use the subclass-join map pattern, but I have the following problem: The parent class has a column contaning the table-name that contains additional child information (the ideal candidate for the discriminator value-currently there are 5 different child tables). The child class has no reference to ...

60. Mixing table-per-class hierarchy and table-per-subclass    forum.hibernate.org

Beginner Joined: Fri Mar 12, 2004 1:02 pm Posts: 23 Hi, I'm trying to mimic a 3-level deep inheritance structure using a mix of table-per-class hierarchy and table-per-subclass (Hibernate 3). For some reason, I can't seem to define the appropriate mapping such that I can nest subclasses accordingly. For example, say I have 3 abstract classes: AbstractZ extends AbstractY, and AbstractY ...

61. How to query across subclasses?    forum.hibernate.org

62. Criteria and joined subclass question    forum.hibernate.org

... ...

63. Joined-subclass joins    forum.hibernate.org

Full stack trace of any exception that occurs:Caused by: java.sql.SQLException: The column prefix 'foo0_1_' does not match with a table name or alias name used in the query. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:418) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:693) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139) at org.hibernate.loader.Loader.getResultSet(Loader.java:1669) at org.hibernate.loader.Loader.doQuery(Loader.java:662) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2145) ... 24 more

64. Selecting subclasses in class hierarchy    forum.hibernate.org

Hey everybody, I have a class hierarchy (table per hierarchy) and would like to return only certain subclasses from this hierarchy that satisfy certain criteria. Class hierarchy looks like this: A -| |-B |-C |-D |-E Let's assume that the superclass has a property called foo. I need to return all subclasses of type B and C (but not D and ...

65. Can I reuse the Java superclass for multiple subclasses?    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.1.3 Hi, I mapped a legacy table with table-per-class-hierarchy strategy. All the subclasses only differs from eeach other by the discriminator, which means all the properties are the same as the super class. To match it this way is because all the required queries are all directly to subclasses, ...

66. mapping subclasses of a common parent to a single collection    forum.hibernate.org

Hibernate version: Hibernate 3.2 cr2 Hi all - I've been reading through the manual and searching the web, but haven't yet found a solution to this. The situation is this, I have a class that maintains a collection, the elements of which are of differing subclasses of a common parent. For example, say I have an EventManager class that maintains a ...

67. Problem with union-subclass and quoted identifiers    forum.hibernate.org

Hi there, if I use the union-subclass with quoted identifiers within the mapped tables, the quotes are not generated into the sql. I had a closer look into org.hibernate.persister.entity.UnionSubclassEntityPersister.generateSubquery() Here the buffer will be added by "buf.append( col.getName() );". I think a col.getQuotedName() should help. Is there any reason for the getName() or is it worth a Jira? Regards Darius

68. how to cascade delete to a joined-subclass ?    forum.hibernate.org

Hello, i used the table-per-subclass strategy to map inheritance. Now, i would like to have the table rows of the subclass tables deleted when deleting an object from the parent class table. Is this possible by adding a cascade-attribute to the mapping ? Where should this attribute go ? I only found documentation/examples for using cascade with sets etc. The mapping ...

69. creating new instance of joined subclass from parent object    forum.hibernate.org

Hello. I have problems creating new instance of joined subclass from already existing object of superclass. The classes in question are: Code: @Entity @Table(name = "person_v") @SequenceGenerator(name = "SEQ_STORE", sequenceName = "person_id_seq") @Inheritance(strategy = InheritanceType.JOINED) public class Person { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_STORE") @Column(name = "person_id", ...

70. multi-table, multi-field keys and joined-subclass    forum.hibernate.org

[b]Hibernate version:[/b] 302 [b]Problem:[/b] I have six tables (from a Mainframe) that are related: Org1 (contains org2 field) maps to Org2 (contains org3) maps to Org3 (contains org4) ... all the way Org6 which is the end of the chain. As shown below, each table has a binary key (orgX and effective_date). I have created hbm.xml files for each file independently ...

71. join fetch for join-subclasses    forum.hibernate.org

Hi. Let`s say that i have one base abstract class named Base, some classes extends that Base class, some of them has collection attibutes, like this: class abstract Base{ //[...] } class A extends Base{ private List someList; //[...] } class B extends Base{ //[...] } This classes are mapped as joined-subclasses, now if i want to retreive whole hierarchy of ...

72. Table-per-subclass mapping issue:    forum.hibernate.org

Hibernate version:3.0 How do I persist the subclass of a class using table-per-subclass mapping? Using hibernate, I created the following tables and mappings. I inserted the following data into the events table: (1, Filmshow, 5) I tried to do the following but it failed with the following error: not-null property references a null or transient value: Event.name; public class Main { ...

73. Filtered relationship to a joined-subclass doesn't work    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.2 CR3 Mapping documents: artifact.hbm.xml Code: ...

74. Problem with joined-subclass proxy    forum.hibernate.org

Well, after digging a bit, I found that if I use "get()" versus "load()" it works the way I would like it to. The weird thing is that the documentation doesn't really spell out any major differences between the two methods other than one returning null if the object isn't found. It appears that load() will proxy the object without doing ...

75. Discriminator in a joined-subclass    forum.hibernate.org

Hibernate version: 3.1.3 Mapping documents: Code: ...

76. Declaring filters on subclasses    forum.hibernate.org

78. Many-to-one not mapping with subclasses    forum.hibernate.org

Author Message skanjo Post subject: Many-to-one not mapping with subclasses Posted: Thu Jul 27, 2006 9:41 am Newbie Joined: Fri Jun 09, 2006 4:27 pm Posts: 10 Hibernate 3.2 rc2 Spring 2.0 rc2 Oracle 9i Java 5 I need another pair of eyes looking at this because I can't see the problem. In a nutshell my problem has to ...

79. Using version in mapping with table-per-subclass    forum.hibernate.org

80. How do I exclude subclasses from a Query By Example?    forum.hibernate.org

Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message stevewickii Post subject: How do I exclude subclasses from a Query By Example? Posted: Mon Jul 31, 2006 4:04 pm Beginner Joined: Mon Apr 24, 2006 9:47 pm Posts: 33 Location: Kansas City, MO Hibernate version: ...

82. SQL query on entity mapped using joined-subclass    forum.hibernate.org

83. Using a factory to serve a subclass instead of discriminator    forum.hibernate.org

In my hierarchy I have a mapped object (Item) with multiple subclasses (C, S, R, N, I) and a discriminator value on the table. Inside the java I use a factory to serve up the exact item I need, and in the mapping file I have to use the discriminator. What I really want is to be able to use the ...

84. reading instance referring to class with subclass from XML    forum.hibernate.org

I have a class MyClass that has a subclass MySubclass, and one instance of MyClass in the database with id=1. Besides, there is a class MyRefClass that references MyClass (many-to-one). When I try to replicate an instance of MyRefClass from XML into the database that references the existing instance of MyClass, I get the following error: Code: Exception in thread "main" ...

86. Best way to change a persistent object to a subclass    forum.hibernate.org

Beginner Joined: Mon Apr 24, 2006 9:47 pm Posts: 33 Location: Kansas City, MO Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Question: What is the best way to convert a persistent object with many associations into a subclass with a table per concrete class implementation? Hibernate version: 3.1.2 Mapping documents: Code:

87. Bi-directional mapping against a subclass    forum.hibernate.org

Hibernate version:3.0 Mapping documents:

88. Problem using "union-subclass" (simple example)    forum.hibernate.org

public abstract class Ressource { private long id; private String name; public long getId() { return id; } public void setId(long id) { ...

90. Determine run-time object class of joined-subclass    forum.hibernate.org

Author Message drexler Post subject: Determine run-time object class of joined-subclass Posted: Tue Aug 22, 2006 9:15 am Newbie Joined: Tue Aug 22, 2006 6:47 am Posts: 1 Location: Netherlands I seem to be unable to determine the run-time types of objects in a mapped class hierarchy using table-per-subclass (joined subclass). The error does only occur if the object ...

91. Table per subclass using discriminator    forum.hibernate.org

92. using joined-subclass property in filter condition    forum.hibernate.org

I'm trying to use a filter with a condition on a property in a joined-subclass. The dtd doesn't support filter in the joined-subclass and if I apply it on the class, the generated sql places the column on the parent table. How do I use a filter on a joined-subclass? Hibernate version: 3.1.3 Mapping documents:

93. Bulk update with joined subclass - ORA-00918    forum.hibernate.org

Hello, I have 2 classes USercontent and content , UserContent extends content as a joined-subclass strategy keyed by the same column Content_id. when i try and do a bulk update using a named hql as... update UserContent uc set uc.isVerifiedByAdmin =:isVerified where uc.id in (:contentIdList) i get an oracle column ambigous error exception. the sql executed and the ...

95. problem attempting createSQLQuery on joined-subclasses    forum.hibernate.org

Newbie Joined: Wed Nov 02, 2005 1:17 pm Posts: 13 Hibernate version:3.0.5 I'm attempting to use sess.createSQLQuery to return a list of SpectralFeatures that meet some spatial constraint (I'm using Oracle spatial). As indicated in the relevant mapping docs (below). SpectralFeature extends AbstractFeature (which in turn extends AbstractE3Element). AbstractFeature contains the spatial information (GEO_SHAPE) used in the where clause. When I ...

97. Obtain objects of subclasses from superclasses    forum.hibernate.org

Hi. I am writing my first serious application with Hibernate. I am using Hibernate 3.2 and hibernate-annotations 3.2.0CR2. I have a bse class: Code: @MappedSuperclass public class Base { // Variables estticas private static Logger log = Logger.getLogger(Base.class); // Variables de instancia private int id; ...

98. Problem to mapping subclass, session factory created failed    forum.hibernate.org

Newbie Joined: Mon Sep 25, 2006 7:58 pm Posts: 19 Location: Chile HELLO: Please, I need to know why this don't work in Hibernate version: Hibernate 3.1.3 Mapping documents: This is Persona.hbm.xml ...

99. Problem to mapping subclass, session factory created failed    forum.hibernate.org

Newbie Joined: Mon Sep 25, 2006 7:58 pm Posts: 19 Location: Chile HELLO: Please, I need to know why this don't work in Hibernate version: Hibernate 3.1.3 Mapping documents: This is Persona.hbm.xml ...

100. Mapping of a Class containing a subClass    forum.hibernate.org