null « Data Type « JPA Q&A





1. Treat '0',"-1" as Null    stackoverflow.com

I am working with a large, old database and i now try to access it with hibernate instead of SQL. One of the larger Problems with this is the use of ...

2. JPA getSingleResult() or null    stackoverflow.com

I have an insertOrUpdate method which inserts an Entity when it doesn't exist or update it if it does. To enable this, I have to findByIdAndForeignKey, if it returned null insert ...

3. Hibernate, NamedQuery & Handlling NamedParamater in the case of it is Null or not available    stackoverflow.com

I am using one named query to search some result in my Project. e.g ( from StructureEventDAO as se where se.Structure.StructureId = :StructureId and se.eventMaster.eventName =:eventName ). This is giving proper result ...

4. What is reason to declare not-null feild in hibernate Proeprty tag?    stackoverflow.com

What will happen if i declare DB null feild as not null in Mapping file. Or if not specified anything in the Proeprty coulmn but it is an not-null feild in ...

5. Firebird - Hibernate - Not Null    coderanch.com

Hi, I am doing a basic save into a firebird db table. All of my varchar fields are defined as not-null. I have mapped my pojo class, giving the correct parameter types as not-null. When I create my pojo, and just try and save, without setting any varchar/string field values, I expect the save to fail, however, when I inspect the ...

6. Hibernate (decode && null)    coderanch.com

8. Hibernate One To Many Not Null    coderanch.com

hi guys i am learning hibernate. can somebody give me a hand. i am trying to implement one to many. relationship unidirectional. i have the following structure on my database. laboratorios could have 1..N lineas CREATE TABLE laboratorios ( codigolaboratorio character varying(15) NOT NULL, nombrelaboratorio character varying(40) NOT NULL, _login character varying(5) NOT NULL, clave character varying(5) NOT NULL, fechaclave date ...

9. Null Pointer.. please help.. :)    forum.hibernate.org

Hi all, I am having problem with "Null Pointer" issue. It happened at line transaction = session.beginTransaction(); in CommonUtility.java Below is the source code: CommonUtility.java Code: package com.univ.util; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; public class CommonUtility { public void create(Object obj){ Session session = HibernateUtil.getSessionFactory().openSession(); Transaction transaction = null; ...





10. PersistentMap does not read records which have NULL    forum.hibernate.org

Hi, I am using Hibernate 3.2.3 along with springframework and currently I am encountering a production issue. I have a mapping in which one of the item is a this typically is mapped to a table which has a PK (composite) and one varchar field. Code:

11. SessionFactory returning null    forum.hibernate.org

Hi all, I am new in Hibernate. I am getting sessionfactory object as null. But the configuration in hibernate.cfg.xml file seems to be ok. Code: oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@10.1.1.1:1521:test ORV5_ETL_ZAIN_KSA_D2 ORV5_ETL_ZAIN_KSA_D2 ...

12. NULL IS NULL check, solution asked for maxdb    forum.hibernate.org

Hello, I'm using Liferay (which is using Spring + Hibernate I guess). And I receive some problems which are related to the NULL IS NULL check. So Liferay know some issues for DB2 and sybase, but I want to find a solution for maxdb The solution for DB2 should be to set next properties: custom.sql.function.isnull=CAST(? AS VARCHAR(32672)) IS NULL custom.sql.function.isnotnull=CAST(? AS ...

13. Lookup of Session Factory in ContextFactory returning NULL    forum.hibernate.org

Hi, We have two separate war files application which are deployed on same weblogic JVM instance. They are sharing a database.They have secondary level cache i.e. ehcache But the problem while using two ehcache in same JVM is if one caches gets updated while a database operation other cache data becomes stale as it is not aware of the first cache ...

14. To "not null" or not to "not null" :-)    forum.hibernate.org

Pro Joined: Mon Apr 16, 2007 8:10 am Posts: 213 Hello, I have a MySql schema with many tables, with lots of them have fields that are not required. For example, one such table is Code: mysql> desc preference; +------------+------------------+------+-----+---------+----------------+ | Field | Type ...

15. unexpected AST node: {vector} using (:param is null)    forum.hibernate.org

I am testing hibernate query with a simple filter where I want to select records based on whether a filter is being specified or not: query = "select u from Unit u inner join u.rec rec where ( (:keywords is null) or rec.keyword.keyword in (:keywords) )" I get this error when :keywords is NOT null: org.springframework.orm.hibernate3.HibernateQueryException: unexpected AST node: {vector} [select ...

16. EnhancedUserType to represent null as false    forum.hibernate.org

Hello I have multiple entity (I don't own the tables) that have properties that represent a Boolean value as either '1' (true) or null (false) in the database (Oracle 10g). I wrote an EnhancedUserType which works great for the most part. The only problem I am experiencing is when I want to do a HQL query for false values. Example: Code: ...





17. Upgrade from 3.5.6 to 3.6.0.Final results in NOT NULL issues    forum.hibernate.org

Like most applications, I load test data before the test starts and delete it afterwards. This has always worked from 3.3.2.GA to 3.5.6.Final. For some reason, upgrading from 3.5.6.Final to 3.6.0.Final causes these exceptions to occur: I'm using hsqldb 2.0.0 Code: org.springframework.dao.DataIntegrityViolationException: StatementCallback; SQL [INSERT INTO task(task_id, name, module_id, ordering, delay) VALUES('1', 'Star Trek', '1', '0', '0');]; integrity constraint violation: NOT ...

19. nullable="false" vs not null in DDL    forum.hibernate.org

Its possible to supply the checks like nullable="false" in orm.xml or jpa annotations or hbm xml for entity fields. Let us say we are coding to a system which is already live and generating the DDL on production is a big no no. Meaning the actual DDL sql is hand crafted. In all likelihood the actual ddl would also have a ...

20. "node to traverse cannot be null"    forum.hibernate.org

Newbie Joined: Sun Jun 12, 2011 1:43 pm Posts: 10 I checked the internet and i can't find a solution to the problem. Would someone please help me with this one. DeleteDocumentAction.java ****************** Code: public class DeleteDocumentAction extends ActionSupport { private static final long serialVersionUID = 2640141927469006062L; private String project_id; //currently has no use//wanted to ...

21. ResultTransformer in Hibernate return null    forum.hibernate.org

@Entity @Table(name = "STUDENT") public class Student { private long studentId; private String studentName; private List studentPhoneNumbers = new ArrayList(); @Id @GeneratedValue @Column(name = "STUDENT_ID") public long getStudentId() { return this.studentId; } @OneToMany(cascade = CascadeType.ALL) @JoinTable(name = "STUDENT_PHONE", joinColumns = {@JoinColumn(name = "STUDENT_ID")}, inverseJoinColumns = {@JoinColumn(name = "PHONE_ID")}) public List getStudentPhoneNumbers() { return this.studentPhoneNumbers; } @Column(name = ...

22. "node to traverse cannot be null!"    forum.hibernate.org

Please help me understand this message. I will show the line that throws this error, then the stack-trace, then the full sources. The line: Code: idList = getSession().createQuery("id from "+getGenericClassName()).list(); stack-trace: Code: id from app.persist.DBBook Sep 2, 2011 4:58:20 PM com.sun.faces.context.ExceptionHandlerImpl log SEVERE: JSF1073: javax.faces.event.AbortProcessingException caught during processing of PROCESS_VALIDATIONS 3 : UIComponent-ClientId=j_idt30:j_idt32, Message=/app/cat/books.xhtml @17,51 valueChangeListener="#{books.changeSize}": java.lang.IllegalArgumentException: node to traverse cannot ...

23. IllegalArgumentException: node to traverse cannot be null    forum.hibernate.org

String queryString = "LOAD DATA INFILE 'C:/Documents and Settings/mob100001791/Desktop/vendor1.csv' INTO TABLE vendor1 " ; session.createQuery(queryString); when i try to execute the above line i m getting th e following Exception java.lang.IllegalArgumentException: node to traverse cannot be null! please get me out of this Exception. more over please suggest how to convert mysql query into HQL query

24.  question    forum.hibernate.org

Hi all, I'm having a question about a many-to-one relationship where not-null is set to be false. What does it affect to set not-null="false"? I'm trying to set null in there, and it doesn't seem to make a difference that the flag is there. There was 1 error: 1) testCreate(test.JunkTest)java.lang.NullPointerException: attempted to save null at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:580) at net.sf.hibernate.id.ForeignGenerator.generate(ForeignGenerator.java:73) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:599) at ...

25. Answer for null in fkey    forum.hibernate.org

26. after buildSessionFactory(),get a null sessionFactory    forum.hibernate.org

i getting a NullPointerException when trying get a session ,and i found it is because i got a null sessionFactory i am new to hibernate, and now doing with a one-to-many case. i am sure the connection to db is well, and web application can find the datasource........ i can see these from command line of tomcat: using datasource: java:comv/env/jdbc/pim so ...

27. using null with setParameter??    forum.hibernate.org

Hi- Having a query with multiple parameters, I sometimes need to execute it with one of the parameters having a value of null. Other times, the parameter does have a value set. Is there any way to accomplish this with a single query using setParameter? It seems it could be accomplished with two different queries -- one using "is null" and ...

28. ehcache assembly and not-null many-to-one    forum.hibernate.org

Regular Joined: Tue Sep 16, 2003 11:35 am Posts: 93 Location: San Francisco, CA hibernate 2.1.1 postgres 7.3.4 ehcache 0.7 I've got the relationship: State -- *UsHouseDistrict Here's the mapping: Code:

29. getColumnIterator() or getPrimaryKey() always return null    forum.hibernate.org

I would like to get the column name(s) (via method getColumnIterator() or getPrimaryKey())) from the child table (i.e. map) to create my dynamic criterion, however, I could get back the table name only, am I missing sth? Code: Criterion criterion = Expression.sql("exists (select 1 from *child_table* where ...

30. null sessionFactory    forum.hibernate.org

I'm using jboss 3.2.3 and hibernate 2.1.2, the deploy it's ok... at least it's what jboss says, the problem is in the client. when i make the lookup the sessionFactory comes null, any ideas?? Thanks, Aldo. Code: public static void main (String[]args){ try { ...

31. EntityPersister.getPropertyTypes() return Null    forum.hibernate.org

Hi , I am really stumped by the following NPE. EntityPersister.getPropertyTypes() returns Null after running on Sun one App Server v7.0 Update 1. Somehow, getPropertyTypes() return Null after it been run 3 times. Any suggestion/help much appreciated. I am using Hibernate 2.1.3 Oracle 9i. Java 1.4.1_01 Code as follows: Session sess; List list=Collections.EMPTY_LIST; Query q; try { sess = HibernateUtil.currentSession(); q ...

32. getClassMetadata(..) returns null    forum.hibernate.org

Using Hibernate 2.1.2, im getting nulls from getClassMetadata(x) where x is the proxy of an entity class.. I have 2 questions: 1: The API doc says nothing about this method returning nulls, but it does say it throws HibernateException... In which cases does what happen? 2: How do i get the metadata for an entity class, for which i only have ...

33. many-to-one using a NOT NULL (that should be NULL)    forum.hibernate.org

hello. two beans: person and company - a person may have 0 or 1 companies. in the database, person has a company_id field. originally, the person.company_id field was null-able and everything was fine. recently, the client requested that we not store nulls in that field because it is causing problems in their other systems. they want an integer value of 0 ...

34. Hibernate is trying to set the FK to NULL    forum.hibernate.org

35. NULL is NULL or 0    forum.hibernate.org

36. Bizarre Null Occurring    forum.hibernate.org

Basically I have a class that I am writing some code to fill a bunch of properties and then I'm persisting it. Several properties are Integer, several are String. The persistence goes fine and all the properties get into the table. Then I do a query and get back all the records, and all the properties are there but one, which ...

37. Problem with "is null" operator and "one-to-o    forum.hibernate.org

Hi! I have 2 classes A, B with a one-to-one mapping. In the xml of class A, I put: .... .... then, in the xml of B, I put: ... ... when I excute this query: ... List list = session.createQuery("from A a where a.b is null").list(); ... it returns all Objects 'a' where ...

38. Spaces to be treated as NULL    forum.hibernate.org

Description: We are forced to use a legacy DB2400 database where each and every field is defined as 'NOT NULLABLE'. This is the case even for those fields storing foreign keys to other entities. In fact for these cases a series of spaces is stored(to represent no association) instead of a NULL value. Refer to highlighted section within the attached log ...

39. FK in many-to-one allows nulls, even if set not-null="t    forum.hibernate.org

2.1.6 Oracle9i I have the following two mappings:

40. NULL is 0 or 1 or 2 or 3    forum.hibernate.org

@ernst and i thought my database-model is a tricky one ;) Is it possible to determine in a generic way which value (0,1,2,3) must be set in case of 'null'? Using 'dummy-objects' would mean, that your application must be able to deal with that, because it's not enough just to compare with 'null' ... or is it required that your application ...

41. Simple many-to-one throwing PropValException on not-null val    forum.hibernate.org

Author Message rsk Post subject: Simple many-to-one throwing PropValException on not-null val Posted: Wed Dec 08, 2004 9:17 pm Newbie Joined: Wed Apr 21, 2004 12:45 am Posts: 11 Summary: This post looks huge because I tried to answer all the questions, but its pretty simple. Consider 2 tables: User UserType As you'd expect, User has a FK "user_type_id" ...

42. need a confirmation - unidirectional and not-null    forum.hibernate.org

Hibernate version: 2.1.6 Mapping documents: I need a confirmation, is it true that with a unidirection association, the ...

43. not-null="true/false" & PropertyValueExceptio    forum.hibernate.org

44. OldValues argument NULL in onFlushDirty    forum.hibernate.org

Regular Joined: Tue Nov 09, 2004 5:15 pm Posts: 100 I'm trying to implement history interceptor based on the implementation provided on the wiki page. I'm using hibernate 2.1.x. My HistoryInterceptor's OnFlushDirty method when called has the oldValues set to NULL. Here's my HibernateInterceptor's OnflushDirty method impl. Code: public boolean onFlushDirty(Object obj, Serializable id, Object[] newValues, Object[] oldValues, ...

45. SessionFactory is null. Please help    forum.hibernate.org

Regular Joined: Fri Feb 25, 2005 3:02 am Posts: 71 I got a nullPointer Exception when I do the following: sessionFactory = configuration.buildSessionFactory(); Can anyone please help me. solve my problem. my hibernate.cfg.xml file has been generated successfully using ant. Am working with hibernate 3.0. But my hibernate.cfg.xml file contains the following line: ...

46. Null Pointer when reading TreeCache Statistics    forum.hibernate.org

Author Message mboni Post subject: Null Pointer when reading TreeCache Statistics Posted: Thu Apr 28, 2005 10:35 am Newbie Joined: Fri Jan 14, 2005 2:53 pm Posts: 7 I'm trying to investigate caching behavior. I've built a small .jsp page to display statistics about the 2nd level cache. When using EhCache, the page displays correctly and the statistics are ...

47. collectionSnapshot is NULL    forum.hibernate.org

Newbie Joined: Thu May 05, 2005 5:49 pm Posts: 11 Location: San Diego, California I am attempting to instantiate and fill my own PersistentCollection. However, when I do so, I get an NPE on the collectionSnapshot contained within the Persistent Collection. I am writing a method which takes a custom PersistentCollection and finds records meeting certain criteria. In this example, the ...

48. NPE: AbstractTuplizer - create proxy with null proxyFactory    forum.hibernate.org

I'm getting the NPE shown below when performing a session.get(Port.class, portID). It seems that despite the fact that the NE persister declares the entity as being lazy and therefore AbstractTuplizer not creating a proxyFactory for it, when loading an instance of Port which has a reference to an NE, the getProxyFactory() method is called in order to create a proxy, and ...

49. null after lookup in jboss4.0.2    forum.hibernate.org

Hi, I am getting the simiklar kind of error. Can anybody help me in this? java.lang.NullPointerException at org.jboss.hibernate.session.HibernateContext.getSession(HibernateContext.java:79) at login.ConnectionFactory.getSession(ConnectionFactory.java:45) at login.ItemService.addUser(ItemService.java:77) at login.LoginAction.execute(LoginAction.java:37) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) The above error i am getting . I tried the same suing Initialcontext also Which is also giving the same error. And also I found this log message before above error ...

50. Hibernate 3 returns Null if the method is final    forum.hibernate.org

Hi, I am facing a problem with "final" getter methods. I have a model class with final getter and setter methods. After loading the object, when I call the get method, it is returning me null. If I change the method to non-final, then I am getting the expected value. This was working perfectly fine with hibernate 2. Can any body ...

52. Three classes, one for each one= "not-null    forum.hibernate.org

When I use two classes Asiento and DetalleAsiento and then insert DetalleAsiento in my set of Asiento.. and save this... it is work... But when I use three classes Asiento, DetalleAsiento and DistribucionDetalleAsiento and then insert DistribucionDetalleAsiento in my set of DetalleAsiento and then DetalleAsiento in my set of Asiento.. it is not work why????? Please help me!!! Hibernate version: 3 ...

53. best practice with NULL question    forum.hibernate.org

Hello, I'm in the middle of a hibernate project and I wanted some opinions from the group as to the best way to handle an issue with NULL values. We have a table with 10 varchar columns and one of the columns can sometimes have a NULL value. Is it better to actually use a NULL value or instead use some ...

54. Question about ConstraintViolationException returning Null    forum.hibernate.org

Hi, I have looked at the oracle dialect, and the pb comes from the fact that the extractUsingTemplate method is called with start and end arguments in english ("constraint (", ") violated", ...) My error message is in french "violation de contrainte unique ()\n" So what to do? Do I have to create my own Oracle9Dialect_fr ? Is there any ...

55. problem with a null pointer in AbstractEntityTuplizer    forum.hibernate.org

This code was working in version 2 of Hibernate. Upon upgrading I get this very hard to trace error bellow. If I comment out this mapping it seems to go away Hibernate version: 3.1 Mapping documents: from PossibleSampleTime.hbm.xml from SchedSampleTime.hbm.xml Code between sessionFactory.openSession() and session.close(): ...

56. JNDI lookup fails! Returns null SesssionFactory    forum.hibernate.org

Newbie Joined: Mon Apr 18, 2005 5:53 pm Posts: 6 Hibernate version: 3.0.5 I have a SessionFactoryObjectFactory deployed in a jboss server (4.0). When I try to access it from an application outside the container (via JNDI lookup) I get a null SessionFactory. Here's the outside container application code: -------------------------------- Properties jndiProps = new Properties(); jndiProps.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.NamingContextFactory"); jndiProps.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); jndiProps.setProperty(Context.PROVIDER_URL, "jnp://192.168.1.3:1100/"); ...

57. help-- hibernate JNDI lookup call returns null    forum.hibernate.org

hi, i have been able to create a JNDI sevice for hibernate but when i try and use it in my web App using the lookup() it returns an error.. pls help this is my hibernateservice.xml java:/PostgresDS org.hibernate.dialect.PostgreSQLDialect java:/hiber/HibernateUtil true this is the code i am trying ...

58. sets are null after retrieving the obj    forum.hibernate.org

I solved my problem. In my method that I was creating the payment, after save I wanted to retrieve the check sets. But because both of save and retrieve are in one transaction, sets were not created yet. Either I had to retrieve my sets in another session, or get checks with query.

59. JNDI lookup fails! Returns null SesssionFactory    forum.hibernate.org

Newbie Joined: Mon Apr 18, 2005 5:53 pm Posts: 6 Hibernate version: 3.0.5 I have a SessionFactoryObjectFactory deployed in a jboss server (4.0). When I try to access it from an application outside the container (via JNDI lookup) I get a null SessionFactory. Here's the outside container application code: -------------------------------- Properties jndiProps = new Properties(); jndiProps.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.NamingContextFactory"); jndiProps.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); jndiProps.setProperty(Context.PROVIDER_URL, "jnp://192.168.1.3:1100/"); ...

60. getID() returns null for CGLIB proxy    forum.hibernate.org

Hibernate version: 3.0.5 I have a many-to-one mapping for an object B that is associated with A. I load A, and B loads as a dynamic proxy. Great. However, when I call B.getId(), I get null. I can call B.getSomeOtherRandomProperty() and I get the value back fine. Is getId() special for dynamically generated proxies? How would I get at this attribute? ...

61. Null pointers when reflection calls methods w/ refs    forum.hibernate.org

I have a question about how Hibernate uses reflection to check all the getters and setters in methods that have references to other classes. For instance, I have a getter that has this line: return this.policy.getName The problem is that when hibernate checks the method right at the beginning of the run, it hasn't yet instantiated the Policy class which is ...

62. Noob: getConstraintName() always returning null??    forum.hibernate.org

Both new to mysql, and hibernate, and currently trying to implement proper error handling, but..I am unable to determine the name of the column programaticaly generating constraint violtions..any tips greatly apprecaited. (I'm guessing the problem may in fact be with the sql creating the table??) The sql part of the exception is able to at least find the 'key index' but ...

63. Many-To-One with not-null="false"    forum.hibernate.org

Your mapping seems fine for this. If the not-null was a problem you would see an exception about this constraint being violated. Do you have existing data in the database? It seems as if you have a blank column value for one of the state_id columns. That's why hibernate is complaining about not being able to find a State with basically ...

65. return null objets from a View    forum.hibernate.org

66. null method in AbstractFlushingEventListener    forum.hibernate.org

67. JNDI Lookup for SessionFactory returns null.    forum.hibernate.org

68. problem using setParameter with null    forum.hibernate.org

Hibernate version: 3.0 Name and version of the database you are using: MSSQL 7 For some reason when I use a Query, setting parameter to null, like so: Query: ("... and menuitem.parentMenu = :parent ..") ..... .setParameter("parent", null, Hibernate.entity(Menuitem.class)); Generated sql shows: and menuitem0_.relationid=? That of course doesnt return proper results. However if I use my Query like: ("... and menuitem.parentMenu ...

69. getConstraintName returns null    forum.hibernate.org

Hi, I'm using Hibernate annotations together with the database PostgreSQL 8.1.2. In some classes I'm using unique Constraints @Entity public class ClubFunctionType extends PersistentObject { @Column(unique=true) private String name; .... } If the constraint is violated Hibernate throws (as expected) an ConstraintViolationException. But the method getConstraintName () returns null. If I violate the same constraint direct in the database I get: ...

70. Set always coming back null    forum.hibernate.org

Newbie Joined: Fri May 12, 2006 3:39 pm Posts: 13 Howdy everyone, I am not sure why this is causing me problems... but for some reason, no matter what, my "PrizeSet" is always coming back as an empty set... It's seriously getting to me as I've been messing around with it for a while... Here is a bunch of info.. I ...

71. fscontext lookup returns null    forum.hibernate.org

I am getting the following debug statement from when executing lookup(). The retunr object is null. 14:36:44,518 WARN SessionFactoryObjectFactory:148 - Not found: 2c91e18a0e0f3f2d010e0f3f30a20000 I did run first time to bind: SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); My hibernate.cfg.xml: java:hibernate/SessionFactory com.sun.jndi.fscontext.RefFSContextFactory file:///moje/visualization/jndi Program that retrieves SessionFactory: Hashtable env = new Hashtable(); env.put (Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.fscontext.RefFSContextFactory"); env.put (Context.PROVIDER_URL,"file:///c:/moje/visualization/jndi"); InitialContext ...

72. Null pointer when using many-to-one    forum.hibernate.org

Hibernate version: 3.1.3 Mapping documents: Event.hbm.xml Address.hbm.xml

73. node to traverse cannot be null!    forum.hibernate.org

74. Configured SessionFactory: null    forum.hibernate.org

When my application starts up using Hiberate, I see a message: INFO - Configured SessionFactory: null Is this ok? Thanks, Steve Here is my hibernate.cfg.xml: java:comp/env/jdbc/dataSource org.hibernate.dialect.MySQLDialect thread ...

75.  FK(SSN) is null when I call getSSN().    forum.hibernate.org

This is Parent, Person: This is Child, Employer:

76. Problem when PK not null -> get unwanted proxy for relati    forum.hibernate.org

Hibernate version: 3.2.4 Description of problem: We have to use primary keys that are NOT null when a new instance of our data class is created (please don't ask why this is the case, we HAVE to do that as most of the system relies on that fact and we don't use String, Long etc. but are own "atom" types that ...

77. nullable FK always null    forum.hibernate.org

Newbie Joined: Wed Aug 01, 2007 5:17 am Posts: 6 Hi all, I have a problem with a nullable foreign key which is not saved creating a new object. (I'm using Hibernate 3.2.5 + HSQLDB 1.8.0.7) If I create the element A and then the element B which has a (nullable) foreign key to A and commit the session, in the ...

78. Can rowCount()/uniqueResult() return null ?    forum.hibernate.org

The only relevant doc I could find was JSR-220-persistence and in section 4.8.4 it says that for COUNT the return type is Long and in case of no objects it returns zero. That does not match our case (return type is Integer and it sometimes returns null) :-( Can anyone sched some light on this ?

79. Weird null pointer    forum.hibernate.org

Author Message rukh Post subject: Weird null pointer Posted: Tue Dec 18, 2007 8:02 am Newbie Joined: Tue Dec 18, 2007 7:41 am Posts: 1 Ok I have this annoying problem with NullPointerException inside a size() method that is called on Set object. Method looks like this (after serveral mutations...): Asset.java Code: private Set attributeValues; ...

80. getID method returns null    forum.hibernate.org

Dear All, if i load records from oracle 10g database via hibernate3 the VO object returns for the primary key field called "ID" null value. If i see the table via the admin console the id's have values. Other fields from the records are ok, i can get theirs value via VO objects. Why the ID is null from VO object? ...

81. [help] How to define a "not-null" one-to-many rela    forum.hibernate.org

Hi, there, I'm a newbie of Hibernate, could you please give me some help over this problem? I can't put too many words in the title so many it's not well explained... My question is: I have to define an association like shown below: | A |----------------- | B | ........(1..*)..........(1) So I defined at the A side a "many-to-one" with ...

82. maxdb issue with upper(NULL)    forum.hibernate.org

I am using hibernate 3.2.6. with mssqlserver 2005 and maxdb 7.6. Using Criteria api. Some queries using left outer joins return different data in both, after investigating, it turns out upper(column1)='hello' is true in maxdb when column1 is NULL (due to the outer join). The problem also happens with lower() and probably other functions. I dont know if you guys are ...

83. Flushing cause not-null violation    forum.hibernate.org

Embarrassed to ask this. I have a uni-directional many-to-one association. When I save a new object from the owning side (the many side), H tries to save it with a null in the association field. It's like this. I've got some classes: Code: class Car { @Id etc... @ManyToOne @JoinColumn(nullable=false) Color color; } ...

84. How can I trap EntityNotFoundException so at to return null?    forum.hibernate.org

When a getter on an entity results in an ENFE I would like to get null back instead of it throwing an ENFE. I have tried the @NotFound annotation but it doesn't work in this case and still results in the exception thrown. @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY ) @PrimaryKeyJoinColumn public X getX () { return X; } Thanks in ...

85. Consultation returns null records    forum.hibernate.org

86. Workaround the not-null="true"    forum.hibernate.org

87. please help org.hibernate.PropertyValueException: not-null..    forum.hibernate.org

I have a function which adds fields of an entity, when I try to add on update screen it gives the following error, same thing works fine on create screen. Error message: -------------------------------------- Hibernate: select MET_TREATMENT_SEQ.nextval from dual 16:11:54,908 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@1abb373 javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value: com.entity.Treatment.reagent at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629) ------------------------------------- ...

88. Always get null from PostUpdateEvent#getOldState()    forum.hibernate.org

Hello, I try to register a PostUpdateEventListener via the hibernate.cfg.xml. Everything works fine but some values I get with the PostUpdateEvent object are at least strange. The one thing which is most critical to my intended use is the getOldState method always returns null. I searched around and found other places where people ran into the same issue but without a ...

89. getSession() is returning null    forum.hibernate.org

Hi All pls help me i am getting following exception.. Code: java.lang.NullPointerException at org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSession(HibernateDaoSupport.java:140) at com.uk.DaoImpl.Operations.save(Operations.java:9) at com.uk.client.Client.main(Client.java:19) Code: package com.uk.DaoImpl; import com.uk.Model.Person; public class [b]Operations[/b] extends [b]BaseHibernateDAO[/b] { public void save(Person person) { try { ...

90. help on getSession() is returning null    forum.hibernate.org

Hi All pls help me i am getting following exception.. Code: java.lang.NullPointerException at org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSession(HibernateDaoSupport.java:140) at com.uk.DaoImpl.Operations.save(Operations.java:9) at com.uk.client.Client.main(Client.java:19) Code: package com.uk.DaoImpl; import com.uk.Model.Person; public class [b]Operations[/b] extends [b]BaseHibernateDAO[/b] { public void save(Person person) { try { ...

91. SessionFactory from JNDI is "null"    forum.hibernate.org

org.hibernate.dialect.PostgreSQLDialect 50 thread false false ...