property « Data Type « JPA Q&A





1. How to define transient property in hibernate?    stackoverflow.com

I am using separate hbm.xml files for hibernate mappings and facing problem in defining transient property. I spent several hours without luck to search a working example or writing my own.
Can ...

2. Using transient property in findBy or listOrderBy methods    stackoverflow.com

I have a domain class using some transient property foo. Now I want to use listOrderByFoo on this property but I get the error "could not resolve property: foo". Is there any ...

4. Property type='customtype' equivalent in many-to-one    forum.hibernate.org

I have a database with a field value that is not a foreign key into another table directly, but whose value can be computed into such a key. Initially, I loaded a field "project" from a batch jobs table as: where "project" was computed from the command given to a batch queue "jobs" ...

5. Best Practice for Transient Properties?    forum.hibernate.org

Newbie Joined: Wed Sep 24, 2003 3:30 pm Posts: 7 Hi, I'm wondering what's the best way to handle transient properties of persisted object. I have a persisted class, User, where one attribute is not saved in the database so is not in the hibernate mapping file. User is also in a many-to-one association with Group. If I retrieve the User ...

6. Date properties    forum.hibernate.org

I want that information about the time of the day in those Date fields be saved persistently, too. But, apparently, it's not. I'm using MySql database (version 4.0.18) to store data. When I check the data saved when I save one of my objects with the "beginning" field set to, say, 2004/1/1 13:00:00 and the "ending" field set to, say, 2004/1/1 ...

7. Checking null property in database    forum.hibernate.org

8. Requiring properties (audit) to be set? (Not not null!)    forum.hibernate.org

In various tables, we have several properies which MUST be entered in order to insert or update a row. For instance we have a property called log_user which tells us who the last person to make a change was. Setting the property to not-null does not solve this as the prior value in the table is irrelevant. What we care about ...

9. Reading NULL in a double property    forum.hibernate.org

Hello! I have a database table with a field called H_Waste. This table should be mapped to a class, which has a property hazardousWaste (with getter and setter, of course). The XML descriptor looks as shown below. Code:





10. hibernate set to null a property before "equals method&    forum.hibernate.org

This test case fails! public void testUserCourse() { boolean enter = false; Teacher teacher = (Teacher) userService.login("prof", "prof"); Course course = courseService.load(new Long(11)); for(Iterator it = teacher.getCourses().iterator(); it.hasNext(); ) { Course temp = (Course) it.next(); if(temp.equals(course)) { enter = true; } } assertTrue(enter); } equals compare only the property description in the Course bean. But debugging i have seen that when ...

11. net.sf.hibernate.PropertyValueException: not-null property    forum.hibernate.org

Hibernate version: 2.1.7c Mapping documents: cat_id_seq

13. UserType accesses property Configuration information?    forum.hibernate.org

Folks, My database uses fixed-length CHAR fields, which I map to variable length String objects. So I would like to employ a custom UserType to trim and pad the DB values as they come and go. However, my UserType implementor needs to know the length of the corresponding column in order to perform the pad. I've tried something like this inside ...

14. Pls Help: "Null value was assigned to a property of pri    forum.hibernate.org

I have a class that is generating this Hibernate exception. If anyone could spot my error, I would greatly appreciate it. This is with Hibernate 3.0.5 Exception trace: Code: Caused by: org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.auenrec.data.Rating.enabled at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:59) at org.hibernate.tuple.AbstractTuplizer.setPropertyValues(AbstractTuplizer.java:207) at org.hibernate.tuple.PojoTuplizer.setPropertyValues(PojoTuplizer.java:176) ...

15. NOT-NULL Property of Object in Sets is "null" some    forum.hibernate.org

Author Message sjksjk Post subject: NOT-NULL Property of Object in Sets is "null" some Posted: Wed May 10, 2006 4:43 pm Newbie Joined: Wed May 10, 2006 3:50 pm Posts: 4 Hi! Since a few days i have a really strange problem with our production system based on hibernate: I sometime get a null value for one property (property ...

16. return empty node for null properties with EntityMode.DOM4J    forum.hibernate.org

hi i dont think there is a way to make hibernate return an empty node for properties that have a null value. but there is a work around You can change your schema and set default value of the columns to empty string rather than null. In that case hibernate returns empty node when there is no data against a column. ...





17. How do I set SQL NULL value to an object's property?    forum.hibernate.org

Hi All, I have kind of run into this situation wherein I need to set null value to an object's property. I have some existing records in a table and I need to set null value to a column for all of them. I understand the Java null is totally different from a SQL Null. For e.g. String aString = null; ...

18. UserType properties    forum.hibernate.org

19. org.hibernate.PropertyValueException: not-null property refe    forum.hibernate.org

Dear friends, Please help me to sort out the following problem when I'm tryiing to delete after setting vognum which is the primary key value in Vog table. "org.hibernate.PropertyValueException: not-null property references a null or transient value: com.DAO.orders.Vog.vogvog" Details are as follows, Hibernate version:3.1 Mapping documents: I've removed some other properties for simplisity ...

20. org.hibernate.PropertyValueException: not-null property refe    forum.hibernate.org

Newbie Joined: Mon May 28, 2007 6:24 am Posts: 11 Location: Bangalore Scenario My program is a Simple Swing program which asks the user to input a ProductID and parts for it. This program demonstrates Hibernate Set Mapping. Hibernate version: 3.2.4 Mapping documents Product.hbm.xml Code: ...

21. null value for property for some values of the DB column    forum.hibernate.org

Hey Uri, Why not just allow nulls in the column? I was trying to find an answer to your same question. Then I realized there was no real reason why I wanted to do it. I had always just kept nulls out of number columns because it means writing less code for data access. However, when using Hibernate, Hibernate handles all ...

23. Property values are null    forum.hibernate.org