1. Hibernate mappings with a discriminator stackoverflow.comI have a table with one field that can point to a foreign key in one of 3 other tables based on what the descriminator value is (Project, TimeKeep, or CostCenter. ... |
2. JPA : Inheritance - Discriminator value not taken into account in generated SQL stackoverflow.comI try to use this mapping :
|
3. Hibernate char discriminator value stackoverflow.comWhy does hibernate think that char discriminators are not safe: Using default @DiscriminatorValue for a discriminator of type CHAR is not safe |
4. How to map one-to-many collection with join table using discriminator stackoverflow.comI'm trying to implement a basic tagging system with hibernate. The problem is that everyone has been subclassing Tag to make the mapping easier. I want to keep my Tag object ... |
5. Single Table Inheritance WITHOUT Discriminator column stackoverflow.comGood Morning, my Dear comrades, This is starting to be come annoying - a simple thing, but hours of struggle, am I getting old?? I am trying to map two Classes to a ... |
6. JPA - Issue implementing single table inheritance using discriminator stackoverflow.comI have two tables. Task and Content. Task forign keys to Content. I have one entity 'Task' mapped to the Task table. I have 4 entites (PrimaryContent, AttachmentContent, MetaContent, and CoversheetContent) ... |
7. Discriminator value from separate table in Hibernate inheritance mapping stackoverflow.comI have two tables, |
8. Discriminator not used in SQL for one-to-many mapping in ColdFusion ORM stackoverflow.comLet's say I have the following entities: Store:
|
9. Hibernate won't add Discriminator Column to Table stackoverflow.comI previously had this entity
Then I changed it to this
|
10. Discriminator column is ignored in JOINED inheritance mappin forum.hibernate.orgHi, I met a problem in JPA mapping. I have the following mapping classes. When I try to insert a record of T5Slip, the discriminator column TAX_SLIP_TYPE is always NULL. If I generate DDL with Hibernate Tools, the Discriminator column is ignored. Anybody can help me? Code: @Entity @Table(name = "TAX_SLIP") @Inheritance(strategy=InheritanceType.JOINED) @DiscriminatorColumn(name = "TAX_SLIP_TYPE", discriminatorType = DiscriminatorType.STRING, length=20) @DiscriminatorValue("BaseTaxSlip") public ... |
11. mapping multiple inhertance table per class + discriminator forum.hibernate.orgHi, hopefully this is straight forward to somebody, and I'm just looking at all the wrong examples or something. Below is an example of what I want to do. It is a very dumbed down example just to make my point. I have a class called "Vehicle". I then have a subclass of that called "Car". Car is then subclasses again ... |
12. Single Table Inheritance WITHOUGHT Discriminator column forum.hibernate.orgGood Morning, my Dear comrades, This is starting to be come annoying - a simple thing, but hours of struggle, am I getting old?? Right, I am trying to map two Classes to a single table using JPA by Hibernate. The idea is to have only a small subset of columns in parent Class, and bigger/full set in the child Class. ... |
13. how to map if discriminator column is also foreign key? forum.hibernate.org |
14. Help with mapping using discriminator forum.hibernate.orgDamn, I'm confused. I have an interface, Animal, and two classes, Cat and Dog that implement the interface. Cat and Dog each have their own table. I have another class, FoundReport, that contains an instance of Animal which could be assigned either a Cat or Dog. And I can't figure out how to map all of this! I want my FoundReport ... |
15. two discriminator values in inheritance?? forum.hibernate.org....but on the other hand, writing this patch would be an good opportunity to enter into hibernate source code. Let's say I would write a patch. This patch would imply minor changes in very basic classes, I suppose. And a change in the mapping dtd. Would this patch be accepted and integrated into future hibernate releases ? More general: If I ... |
16. Discriminator mapping problem forum.hibernate.orgAuthor Message MarcusZ Post subject: Discriminator mapping problem Posted: Mon May 10, 2004 1:23 am 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 Child1 has ... |
17. Inheritance: Mapping discriminator values forum.hibernate.orgI have a special case of mapping classes to tables. Facts: 1. Let's say I have a DB table called IDENTITY 2. 2 different classes map to this table via 3 discriminator values 3. Discriminator values have significance elsewhere in the application and thus are not solemnly for hibernate mapping purposes So, the two classes are: 1. ProgramID 2. PersonID Discriminator ... |
18. fun with discriminator and inheritance forum.hibernate.orgpublic class Father implements java.io.Serializable { private Long id; private String fathersName; public Father() { } public Father(Long id) { this.id = id; } ... |
19. hierarchical mapping without discriminator forum.hibernate.orgchristophe_grosjean wrote: hi, I'd like to know how Hibernate can, in case of hierarchical mapping, instantiate the right class if no discriminator is defined in the mapping file. The documentation claims it does it. But I'd really to know how. Thanks for your answer Christophe The magic of implicit polymorphism =) I was really blown away the first time I tried ... |
20. How to map table per concrete class without discriminator? forum.hibernate.orgI have wasted a lot of time trying to get this mapping to work. Perhaps you can help: Code: CLASSES -------------------------------------------------------------------------------- Order Collection payments Payment (abstract class) Long paymentId CashPayment extends Payment String someCashSpecificAttribute ... |
21. HQL with discriminator does not map to any class. forum.hibernate.org |
22. discriminator is repeated along inheritance, how to reuse? forum.hibernate.orgtrying to map a legacy db (sybase, why?), I encountered the following concern: discriminator is used couple of times along the inheritance, fetched using a formula (sql select something). I don't want to requery using that formula, but to reference that discriminator on the parent. more detailed: entitiy A has a discriminator 'Ad' fetched using a formula from another table. B ... |
23. Mapping 1 class to 2 tables using a discriminator value forum.hibernate.orgHi Spaceman, With the use a discriminator, your ExtinctAnimals and NonExtinctAnimals will end up in one table: |
24. JPA: SINGLE_TABLE Inheritance, no discriminator in SQL forum.hibernate.orgNewbie Joined: Thu Dec 20, 2007 11:25 am Posts: 1 Hello, environment: i use container managed jta transactions (glassfish v2, EJB 3.0) and i use only jpa, i.e. my whole application is container managed. model My model consits of two tables, a contracts table and a contract_data table. The contract table is mapped to ContractSuperClass and the contract_data table is mapped ... |
25. map same column as discriminator and propery forum.hibernate.orgDoes anybody know if it is possible to map a column as a discriminator and a property in the same object, like: Code: |
26. Mapping inheritance without discriminator column? forum.hibernate.orgHi guys, I have a question concerning mapping inheritance in Hibernate. I like to map the last subclass of the inheritance map to database tables and I want Hibernate not to use a discriminator column for mapping. Let's say I have the classes A, B and C and B is subclass of A and C is subclass of B: C extends ... |