Internal Website Search

1-50 of 200 results

Comparison in JPQL and Criteria API

. Besides the different notation, there is also a difference in the way that NULL values are handled by these operators. Comparing NULL values The following table shows how NULL values are handled by each comparison operator. One column presents a comparison of NULL value with a non NULL value

Logical Operators in JPQL and Criteria API

must be one of: TRUE, FALSE , and NULL . The following table shows how the AND operator is evaluated based on its two operands:   TRUE FALSE NULL TRUE TRUE FALSE NULL FALSE FALSE FALSE FALSE NULL NULL FALSE NULL NULL represents unknown. Therefore, if one operand is NULL and the other operand is FALSE

Null enums and IS (NOT) NULL: NullPointerException

Hello. I'm getting NullPointerException when adding %enum field% IS (NOT) NULL or == (!=) NULL in ... () { Query query = entityManager.createQuery("SELECT e FROM TEntity e WHERE e.exampleEnum IS NULL ... values to NULL was fixed in build 2.5.5_03. support Support

Null returned by Persistence.createEntityManagerFactory

Hi, So I'm currently having an issue where createEntityManagerFactory returns null . When I run ... the application I get an exception. The exception is ultimately caused by a null pointer on the line "em ... rather than an ObjectDB class), it may throw an exception but it never returns null : public static

c.o.jpa.type.EntityTypeImpl.getIdType() returns null

; if (type == null ) {     throw new IllegalArgumentException(    ... the debugger is i can see this member m_idType is null type EntityTypeImpl   (id=57) m_attrMap ... SingularAttributeImpl   (id=96) m_idType null m_superType null m_sysType Class (package.Foo) (id=49) m

NULL prefered in ORDER BY?

Hi! Is there a way to NOT prefer NULL in Order BY? I.e. assume this: @Entity class Hint {   ... hint; } I've got a few Test entries, some do have a hint assigned, some do not ( NULL ). Now when I ... } and third one to NULL : Test 3 (with hint = NULL ) Test 1 (with hint = A ) Test 2 (with hint = B) And descending: Test 2

How can allow multiple null value in a Unique column.

I have a entity Person have 2 fields Name(Unique) and PhoneNumbers. I wants to allow null value ... ; Manoj Manoj Kumar Maharana ObjectDB considers a null value as any other value, so indeed, for a unique field you cannot have more than one  null value. If you need multiple null values then 

@OneToOne query issue with OR and IS NULL

"another" is null ... in the second one "another" is set. Now I want to query " select from A where another is null OR another.counter = 0 "  What I expected to get where the 2 entities I inserted before. But I always get just the entity A were "another" is not null . Could someone help

pm.newObjectIdInstance returns null

) throws PersistenceLayerException { MyClass myclass = null ; try{ Object objectid = pm ... (JDOException jdoe){ } return myclass; } objectid is coming back as null .  Does this problem ... is to search for an ID class, and if this fails a null is returned. You can check that operation

@OneToMany(fetch = FetchType.LAZY) list is always null

to J2EE. parent.getChildren() returns null . Here is a simple example: Bean: @Named("test ... (); entityManager.persist(child); if (child.getParent().getChildren() == null ) { child.getParent().setChildren(new ... of the array of the child entity, the array becomes null . public class ByteData { // ... id private byte

Unexpected internal exception during set field of an Embeddable to null

; protected void clearOriginalValue() {         originalValue = null ... .__odbTracker != null && signalvalueimpl.__odbTracker.beforeModifyMember(1)) { signalvalueimpl ... the instanceValue!         originalValue = null ;    

Literals in JPQL and Criteria Queries

including NULL , boolean literals ( TRUE and FALSE ), numeric literals (e.g. 100 ), string literals ... is always used and never replaced. The NULL literal The NULL literal represents a null value, similarly to null in Java and SQL. Since JPQL is case insensitive, NULL , null and Null are equivalent. Notice

Missing (null) elements in eager loaded references

: Sometimes! only on our server! I get a NullPointer exception, because an element is null which is! not null ... () The getLabel() throws an NullPointer because the DataElement at index 0 is not yet present and thus null ... the elements are yet not loaded from the db and thus are null ? Otherwise a cannot explain

failure to enforce NOT NULL for java.lang.String

.createEntityManager(); EntityTransaction tr = em.getTransaction(); Request r = new Request(); r.setUsername( null ... the database with username= null . the target/ directory is wiped out by `mvn clean` so i am certain ... : Attempt to reuse an existing value ( null ) (error 613) at com.objectdb.jpa.EMImpl.commit(EMImpl.java:279

How to avoid NULL values on Embedded entities

Hi there. I'm new on this. trying to learn. I'm trying to make a value non nulleable. So, when I try to upload to the DB this field as null , it give me an error. I tried this, but it didn't work ... clear   Edit: Sorry. Solved. The code was working, the problem was that i'm savin an empty string "" (not null ) elnll002 Facundo Curti

Missing Data on Retrieval (0, null values)

 Bad - many null and 0 Values. Secound try: List resultList1 = em.createQuery("SELECT d  ... .       harald77 Harald The null and 0 values may be the result of lazy loading

NOT NULL not working

.lastPosition IS NOT NULL returns no datasets. Is this a bug or am i missing something? mosi0815 Ralph ... send you a ticket with the DB. Try this query:  SELECT FROM Unit u where u.lastPosition IS NULL

Handling "is null" in where clause

Greetings, I was playing aroung with JPQL and have found that there is a problem with "is null " queries. When you use "is null " in where clause, query runs correctly, but results are incorrect. Let me show you an example: - entity @Entity public class EntityA {     @Id  

null pointer exception in objectdb-2.4.4_06

I have the following stack trace.  Is this a null ptr in our code or in the object db code? Failed to commit transaction:  (error 613) at com.objectdb.jpa.EMImpl.commit(EMImpl.java:279 ... to persist (indirectly via cascading) an object with a null primary key. Build 2.4.4_17 may provide a better error message in this case. support Support

Database Explorer

the following commands: The Edit Set Reference Set to Null command is used to set a reference to null ... the value to null without deleting any referenced entity object. On the other hand, deleting ... the following commands: The Edit Add to Collection Add Null command is used to add a null value. The Edit Add

JPA Entity Fields

the database every persistent field must contain either null or a value of one of the supported ... a generic java.lang.Object , as long as the type of the actual value at runtime is persistable (or null ... above demonstrates using field and relationship annotations to change the default behavior. null values

FROM clause (JPQL / Criteria API)

inner value it gets at least a  NULL value as a matching value in the FROM iteration. Therefore, a Country c with no Capital city has a minimum representation of (c, NULL ) in the FROM iteration ... variant returns Nauru with a NULL value as its capital. [LEFT [OUTER] | INNER] JOIN FETCH JPA support

Paths and Types in JPQL and Criteria API

). Navigation through a NULL value The following query retrieves country names with their capital city names ... Nauru, c.capital is evaluated to NULL and c.capital.name is an attempt to navigate from a NULL value. In Java, a NullPointerException is thrown on any attempt to access a field or a method via a null

Database Schema Evolution

with default values ( 0 , false or null ). Fields in the old schema that do not have matching fields in ... with a default value ( 0 , false or null ). The following type conversions are supported: From any numeric ... boolean ( 0 , null and false are converted to false , any other value is converted to true ). From

Index Definition

every indexed field must contain either null or a value of one of the following persistable types ... values of the above types (including null ). Indexes can only be defined on ordinary persistent

Retrieving JPA Entity Objects

null is returned. A similar method, getReference , can be considered the lazy version of find ... might be returned ( null is never returned). A hollow object is initialized with the valid primary key

JPA Persistable Types

their values (i.e. elements in collections and arrays and keys and values in maps) are either null

JPA Query Expressions (JPQL / Criteria)

: =, , =, IS [NOT] NULL , [NOT] BETWEEN, including  Collection operators: [NOT] IN, IS [NOT] EMPTY

Deleting JPA Entity Objects

to null or to another Address object. If orphanRemoval=true is specified the disconnected Address

com.objectdb.o.InternalException: null

Customer spouse = null ;     private Date dateOfBirth = null ;     private String firstName = null ;     private String lastName = null ;     private String personalNumber = null ;     private String street = null ;   

Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct)

via a querying @EJB gives many fields null (and not even empty, I mean truly null ). In ... simple @OneToOne relationship fields that likewise become null : private List ownedElements = new ... .greensoft.entity.test.TestDeepValues [ null ](TEST: test deep values) INFO: RequestBean []: Persisted

com.objectdb.o.InternalException: java.lang.ArrayIndexOutOfBoundsException: null:

.ArrayIndexOutOfBoundsException: null java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at com ... ,owner); return t; } catch (InstantiationException ex) { logger.log(Level.SEVERE, null , ex); } catch (IllegalAccessException ex) { logger.log(Level.SEVERE, null , ex); } catch (IllegalArgumentException

Enum fields are set to null and embeddable enum class does not show in explorer

in the related objects is set to null . This is highly critical because it will cause data loss ... (fetch = FetchType. EAGER ) @Enumerated(EnumType. STRING ) private List roles = null ; itsme Martin ... ) and the value is null . itsme Martin Petzold  Could this be the case because the enum type

spuriously objectdb objects have null references

are null (i.e. references actions, childNodes), even after a subsequent refresh. we are using a separate ... definitions are (for the null references above): ... @OneToMany(fetch=FetchType.LAZY) @Index public ... that have not been loaded with null values. Detached objects cannot be refreshed. Does it happen

NULL reference, how to remove

;   hgzwicker Hans-Georg Zwicker More information is needed about this NULL reference ... such null references do you have? Do you have any idea what operation could be related to these specific actions that made them NULL ? support Support Is there new information regarding this null

JDO PersistenceManager.getSequence() returns null sometimes

to it. If nothing has yet been persisted, or if the odb file is not newly created, getSequence() returns null . Code ... = pm.getSequence("seq"); // per JDO spec, it should be testcase.seq if (seq1 == null ) System.out.println("getSequence 1 returned null "); // it should never be null pm.currentTransaction().begin

"is not null" queries not working with index

"is not null "-queries are not working correctly for indexed fields. Following SSCCE creates 1000 entities. A null value is assigned to an indexed field for every second entity. When doing count-queries at the end, wrong results are fetched. import java.io.Serializable; import javax.jdo.annotations

Null pointer exception being thrown from within ObjectDB.

.NullPointerException: null java.lang.NullPointerException at com.objectdb.o.VAR.S(VAR.java:297 ... .createQuery(q);     List reportDownloadObjects = null ;     try

javax.jdo.annotations.ForeignKeyAction.NULL

JDO Enum Constant in javax.jdo.annotations.ForeignKeyAction NULL Since: JDO 2.1

[ODB1] Chapter 4 - JDO Metadata

demonstrated by field f6 . null -value (exception | none | default) The null -value attribute is also intended for persistent reference fields. It indicates whether the field can accept null values or not ... attempt to store a persistent object with a null value in that field. If the null -value attribute

[ODB1] Chapter 6 - Persistent Objects

by strings). If getObjectID( ... ) is called with a transient parameter, it returns null ... string, but also a Class instance. ObjectDB ignores the first argument. Therefore, a null value ... yet (and may be seen as null values in the debugger). When an access to another persistent object

[ODB1] Chapter 7 - JDOQL Queries

' , ... string "", " ", "abcd\n1234" , ... boolean true, false reference null   As shown in ... , a NullPointerException is thrown on any attempt to access a field or a method using a null reference. JDOQL behavior is different. An attempt to access a field or invoke a method using a null reference

Step 4: Add a Controller Class

name = request.getParameter("name"); if (name != null ) guestDao.persist(new Guest(name

Step 4: Add a Servlet Class

a new guest (if any): String name = request.getParameter("name"); if (name != null ) { em

Step 4: Add a Controller Class

"); if (name != null ) guestDao.persist(new Guest(name)); // Prepare the result view (guest.jsp): return

Step 4: Add a Servlet Class

("name"); if (name != null ) guestDao.persist(new Guest(name)); // Display the list of guests: doGet

Step 4: Add a Servlet Class

a new guest: String name = request.getParameter("name"); if (name != null ) guestDao.persist(new

Step 4: Add a Servlet Class

.getParameter("name"); if (name != null ) { em.getTransaction().begin(); em.persist(new Guest(name)); em

[ODB1] Chapter 9 - ObjectDB Explorer

, to an exiting object or to null . You can add objects or references to a persistent collection using ... . Deleting a reference field sets the value to null without deleting any referenced persistent object

[ODB1] Chapter 3 - Persistent Classes

) must have a reference to an object whose type is persistent at storage time, e.g. an Integer , or null ... values ( 0 , false or null ). Old persistent fields that are missing in the new class are just