1. Hibernate cascading: should setting to null on a parent delete children? stackoverflow.comCollection.clear() will delete children whenever Session flushes. What about OneToOne? Setting to null is not a correct way. No clear() method for OneToOne exists. Table_A has a column (not its PK!) that OneToOne ... |
2. Hibernate: How to delete child records instead of setting foreign key to null stackoverflow.comI have a User and a set of Authorities in a one-to-many relationship: User.hbm.xml:
When I delete a ... |
3. hibernate cascade - update child to null stackoverflow.comI have a one to many relationship between event and session. I'd like cascade to update event fk in session to null when i delete the corresponding event. Any clue how ... |
4. Hibernate mapping returns null properties stackoverflow.comI have a Hibernate mapping setup. The table is species, my Java class is Species. hibernate.cfg.xml points to mappings in species.hbn.xml In my code I'm using a simple HQL query and then ... |
5. can we put (null,null) in map type Collection in Hibernate...? stackoverflow.comcan we put(null,"null") in map type collection to stroe in DB and how it can be retrive? |
6. How can I prevent Hibernate from updating NULL values stackoverflow.comIs there a setting in hibernate to ignore null values of properties when saving a hibernate object?
NOTE |
7. deleting child explicitly by using parent.setChilds(null) stackoverflow.comI have 2 objects |
8. One-to-many mapped object results in null pointer forum.hibernate.orgView unanswered posts | View active topics Board index Hibernate & Java Persistence Hibernate Users All times are UTC - 5 hours [ DST ] One-to-many mapped object results in null pointer Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message dipeolay Post subject: ... |
9. Initializing child Objects to non null values? forum.hibernate.orgHi I was wondering if it is possible to initialize child objects to non null values if they don't exist or their records are null? Example: Credit Union Object { Location location; } The location may actually not exist in the database, however for the sake of my webapp it calls cuobject.location.name, and if the location object gets loaded as null ... |
10. Null-values in Map: 1.x to 2.x difference forum.hibernate.orgHi, We are currently trying to upgrade from Hibernate 1.25 to Hibernate 2.1.1. This seems to be straight-forward and well-documented. However, we have run into a rather surprising difference in the way Maps with null-values are dealt with. We have been using Hibernate for about a year now, in a medium-sized web-application that has been in production for a few months. ... |
11. mapping-problem, null-values forum.hibernate.orgNewbie Joined: Thu Apr 08, 2004 7:32 am Posts: 10 Hello, I've a mapping-problem. I hope, someone can help me out. I've the three classes "Kunde", "Projekt" and "Job". The associations between these classes look like that: Kunde 1---n Projekt Projekt 0---n Job Kunde 1---n Job A Job can belong to a Projekt or not, but must belong to a Kunde. ... |
12. Mapping problem: not-null property references a null value forum.hibernate.orgAuthor Message austvold Post subject: Mapping problem: not-null property references a null value Posted: Wed Jun 09, 2004 8:41 am Newbie Joined: Fri Apr 23, 2004 4:18 pm Posts: 15 Location: Oslo, Norway I am having some trouble solving a problem where Hibernate complaints about "not-null property references a null or transient value" during flush after a delete. Basically ... |
13. Can one-to-one mapping be null? forum.hibernate.org |
14. How can I map a many to zero association - Null problem??? forum.hibernate.orgI found a lot of exemple on how to handle the many-to-one, many-to-many association but not the many-to-zero association. The problem is when there is no association data that cause a null error. How should I map my association to avoid the null problem? This is the mapping section code that causing me the null problem: |
15. null id generated for:class - one-to-zero mapping forum.hibernate.orgI'm trying to map a one-to-zero relationship where the optional side of the association has to have its key generated as the foreign key of the other side of the relationship. THis is how the exisiting database code works and I have to ape this When I try and save a DiaryAction (the one), with an associated ActionDocument (the one or ... |
16. Help needed: Mapping a collection from a null property forum.hibernate.orgHi, I have an issue regarding hibernate2. Involved are two entity types "Category" and "FieldTitle" and a mapping table namend "CATEGORY_FIELD_TITLE". Category is a one-to-many-hierarchy-Structure (a Category can have child Categories etc.) To any Category several FieldTitles are assignable to configure, what fields are available in the child Categories (to put information in). That means: What fields you can fill out ... |
17. Improvement suggestion: null values in properties mapping forum.hibernate.orgThis is an interesting addition because it influence something I've been thinking about for a while: we could hide the ternary operators IS [NOT] NULL and make SQL a little bit easier to use. I didn't spend much time trying to figure out the consequences of this. Please post to JIRA as Improvement and include my response. Thanks |
18. many-to-one mapping null after a save forum.hibernate.org |
19. many-to-one mapping returns null for valid query forum.hibernate.orgNewbie Joined: Fri Jun 03, 2005 3:39 pm Posts: 9 Please scroll down to see my question/problem. [b]Hibernate version:[/b] 3.0.5 [b]Mapping documents:[/b] Mapping file: |
20. Mapping null to -1 forum.hibernate.orgwell, jaimes tip was perfectly all right ... With a custom UserTypes you can do this ... i think you won't be able to find a more "general" solution which is as easy as writing some UserTypes, especially because you can find some examples of such UserTypes in the forum. In Hibernate (as far as i know hibernate) the (User)Types are ... |
21. Hibernate |
22. How to map forum.hibernate.orgHibernate version: 3.1 I'm trying to create a map for the following Code: class DomainObject { int id; Map< AddressKey, AddressAttributes> addresses } class AddressKey { int id; } class AddressAttributes { int id; AddressKey key; String ... |
23. Hibernates return null for map value object forum.hibernate.orgHibernates return null for map value object if all persistant properties of the object are set to null. So, because of this I have a problem. I have main object with map property. In hibernate mapping, the values of the map are composite elements. When i instantiate new composite object without setting any of it's properties (they all have null value), ... |
24. Save an object where a mapped property is NULL (yes_no type) forum.hibernate.org |
25. Children of a one-to-many have |
26. Null child table forum.hibernate.orgHello All , I am new to Hibernate so this might sound like a stupid question but here is goes. I have 2 tables table A and B. A is the parent to B. A has field called b_id. which is the Key to my B table. My problem is when I query table A and table B does not have ... |
27. Cascade="persist" propagates to null child object? forum.hibernate.orgHi, I have the following problem: Cascade="persist" for parent and child objects. When saving parent object where child object is sometimes null, Hibernate saves also the null child object. That means an empty row in table(except the id as primary key). I think it is better not saving empty row if child object is null. How can we avoid this problem? ... |
28. Why set NULL in cascade for second update in child object? forum.hibernate.orgRegular Joined: Wed Mar 15, 2006 1:48 pm Posts: 91 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp [b]Hibernate version:[/b] 3.2.0 GA [b]Mapping documents:[/b] |
29. automatically delete child object when it is null forum.hibernate.orgI think that's not exactly the point - there is no Collection in my example. Your suggestion does not work. It's hard to believe that this case is not serviced by hibernate. Maybe I should make my RegistrationAddress a Collection of one element? But this is rather workaround than the solution of this problem. Thanks anyway, Pawel |
30. Delete parent > set child's ref column to null forum.hibernate.orgHi, I can't figure this out and I hope someone out there has. Code: class Parent { @OneToMany(mappedBy="parent") private List |
31. Null value object in persistent map when retrieved. forum.hibernate.orgI feel certain that this is just a mapping issue, but since I can't find a solution... I've got an object that contains a Map in which both the key and value are other objects. The Key object is a persistent object. The Value object contains a couple of other objects that represent Money. I am able to save these map ... |
32. NULL values in maps - solved Issue? forum.hibernate.org |
33. Hibernate mapping returning Set & null intermittently forum.hibernate.orghi all, I need help in understanding how the collection mapping works with hibernate. I have this sample mapping in my application. Mapping for class Employee private Set departments; //Note here i havent given initialized to any value.. public Set getDepartments() { return departments; } public void setDepartments(Set departments) { this.departments = departments; } In my Dao class when i use ... |
34. cascading to set null in child forum.hibernate.org |
35. Error mapping to a null value forum.hibernate.orgHi all, I'm new to hibernate and I'm having trouble with a many-to-one mapping. Our database contains a mixture of null values and single spaces which represent a null. Unfortunately this is something that we can not change. When we run our query Hibernate finds a single space and attempts to find this value as a primary key in the other ... |
36. Hibernate returning null sets for a mapping forum.hibernate.orgNewbie Joined: Tue Jun 09, 2009 4:03 am Posts: 2 Hi! I have a mapping to an (Oracle) view and have been noticing very weird behaviour. If I do the following HQL inside my DAO (where MyDataClassVw is a view) Code: from MyDataClassVw I get back (according to MyEclipse 7.1.1) results of |