1. Customized naming of columns in JPA relationships stackoverflow.comWhen I make relationsships with JPA using hibernate, some terrible long and ackward column names are generated. |
2. How to prevent Hibernate from nullifying relationship column during entity removal stackoverflow.comI have two entities, A and B. I need to easily retrieve entities A, joined with entities B on the condition of equal values of some column (some column from A ... |
3. Many-to-many relationship on the same entity without additional join table columns stackoverflow.comI have an entity that has many-to-many association to itself. If I needed some additional properties (like asked here) the answer would be to use a new intermediate entity. But without ... |
4. More than one relationship using the same join column forum.hibernate.orgI'm using a legacy database schema with composite keys. I have an entity with two relationships and one of the join columns is shared. For example, Let's say i have a Student entity with two relationships Department and Course. Department uses dept_code column while Course uses dept_code and course_code colum. The domain model is such that a student might belong to ... |
5. How to prevent Hibernate from nullifying relationship column forum.hibernate.orgI have two entities, A and B. I need to easily retrieve entities A, joined with entities B on the condition of equal values of some column (some column from A equal to some column in B). Those columns are not primary or foreign keys, they contain same business data. I need to have access from each instance of A to ... |
6. Relationships/FKs to non-PK columns forum.hibernate.org |
7. many-to-many relationship with extra columns in join table forum.hibernate.orgI've read all the documentation and many of the forum postings and haven't found an answer to my problem. I have a many-to-many relationship with the same table. Here is the mapping: |
8. Many-to-Many - extra columns in the relationship table. forum.hibernate.org |
9. joining on a non-relationship column forum.hibernate.orgI'm trying to do an outer join on two columns that aren't Primary or foreign keys, and that are not mapped in a collection. Something like this: select person from Person as Person, Subscriber as subscriber LEFT OUTER JOIN person.EmailAddress on subscriber.EmailAddress Is this possible? If not, how can I map collections/relationships using columns that _are not_ keys?? |
10. relationship on non-key columns forum.hibernate.org |
11. many-to many-relationship: corresponding columns don't match forum.hibernate.orgSession hbSession = hibernateSessions.openSession(); Transaction trx = hbSession.beginTransaction(); Query persquery = hbSession.createQuery("SELECT pobject from Person AS pobject WHERE pobject.Id = :id_value ORDER BY Id "); persquery.setInteger("id_value", 4905); Person auth1 = (Person) persquery.uniqueResult(); Set authors = new HashSet(); authors.add(auth1); Abstract hbabstract = new Abstract(); hbabstract.setAuthors(authors); hbSession.save(hbabstract); trx.commit(); |
12. Many-to-Many with additional column in relationship table? forum.hibernate.orgHello, I try to incorporate into Hibernate since several weeks, and i hardly got it. But there's a important silly thing that i don't understand: I defined three tables: task, parameter and task_parameter, which represents the relationship between task and parameter. (task) 1 ----- n (task_parameter) n ------ 1 (parameter) So far, so good. But now i need to save an ... |
13. Problem with Many-to-one relationships - Repeated column in forum.hibernate.orgSorry me. Here is the Schema CREATE TABLE FREYA_RULESET( RULESET_IID int IDENTITY(1,1), ENTERPRISE_IID int NOT NULL, NAME varchar(100) NOT NULL, TYPE varchar(10) NOT NULL CHECK (TYPE IN ('System','Custom')), DESCRIPTION varchar(255) NOT NULL, EFFECTIVE_DATE datetime NOT NULL, EXPIARY_DATE datetime NULL, CONSTRAINT PK_FREYA_RULESET PRIMARY KEY NONCLUSTERED (RULESET_IID) ) go CREATE TABLE FREYA_RULESET_VERSION( RULESET_VERSION_IID int IDENTITY(1,1), RULESET_IID int NOT NULL, ENTERPRISE_IID int NOT NULL, ... |
14. 3rd column in a many-to-many relationship forum.hibernate.org |
15. Column-Row Relationship forum.hibernate.orgHello, world! :) I want to replace all the queries by Hibernate technology in my project. An there is one problem appeared. I searched such type of relation in all the documentation of Hibernate but have nowhere found it. All columns in table `Clients`, must have properties, for example, visibility in program, or editability in program. As I see, there must ... |
16. many-to-many relationship table with additional columns forum.hibernate.orgHi, I've a problem with mapping many-to-many relation. My requirement is to find the menus with all their roles and menu_role properties. I found some examples for normal many-to-many relation with 3 tables, in which the 3rd table contains only the foreign keys. But in this scenario, in addition to the menu_id and role_id there are 2 more fields READ_FLAG and ... |