About string

api-jpa

Criteria Query Selection and Results

Reference (JavaDoc) of JPA query criteria result interfaces, including Selection, CompoundSelection, Order and Tuple.... package, since they might be useful also in string based JPQL queries. Using tuples with non criteria queries is supported ...

 
forum_thread

Primary key generation problem after changing entity package

Hi, I changed package name for some of my entities in database. I added info in <schema><package... /></schema> of my configuration file - and the changes have been succesfully made in database. Unfortunately, sequences have been probably lost for changed entity classes. After schema change I keep getting errors : Attempt to reuse an existing primary key value... My primary keys are annotated as shown below : ...   public static void main ( String [ ] args ) { ...

 
forum_thread

How to enhance the JPA/Spring/MVC to implement RESTfull for CURL client?

Here is my attempt to enhance the JPA/MVC/eclipse tutorial to implement a RESTful service. Why does this not work with this curl command? I get 404. Can someone help me correct this? Do I need to change my web.xml servlet mapping in web.xml? I've been experimenting with and nothing seems to work. Thanks Siegfried Here is my web.xml fragment: ... String username) {   return guestDao.getAllGuests().get(0); } ...

 
forum_thread

Cast exception?

Somehow I am unable to persist an entity class I wrote with manual @Id. I have a small Player class and I wish to store it with user ID as the primary key. So I declared the (only) primary key field as: @Id public int uid; This is how I'm persisting the instance: ... createEntityManagerFactory ( String paramString, Map paramMap ) /* */ { /* 73 ... 0 or none of them is able to create an emf with the given string... This is quite strange since we  are  able to ...

 
manual

Obtaining a JPA Database Connection

Shows how to use Java/JPA to connect to the ObjectDB Object Database.... file path (absolute or relative) is also accepted. Any string that ends with .odb or .objectdb is considered by ObjectDB to be ...

 
forum_thread

problem when primary key value is zero

I am copying data from a postgres database to objectDB. Some of the rows in the postgres table were created by postgres DDL / SQL insert statements and so do not abide by all JPA rules and recommendations, in particular there are some primary keys with value == 0. These cause problems for objectDB, typically "JPA Unexpected argument as primary key". When using eclipselink, there is a workaround that can be added to persistence.xml like this: ...   public static void main ( String [ ] args ) { ...

 
tutorial

Step 3: Add a Main Class

Explains how to add the JPA tutorial Main class in NetBeans.... { public static void main ( String [ ] args ) { // Open a database ...

 
forum_thread

ClassNotFoundException messages in the log file

In the ObjectDB log file, I still see one ClassNotFoundException.  Is this to be expected, or do I have another issue I need to correct? ... ] java. lang . ClassNotFoundException : String at java. base / jdk. internal . loader . BuiltinClassLoader . ...

 
forum_thread

Field in Generic Class not persisted?

Hi, I am trying to persist a class which is extended from an abstract class - but fields declared inside the abstract class are not persisted - is that expected? I assume it can be done b/c this field can be recovered after serialisation/deserialization. Here is an code to demonstrate the problem Thanks   ...   public static void main ( String [ ] args ) { OBJ6 H = ...

 
forum_thread

Insert time increases as db grows.

Hello, ... on every entity and additionally one entity have index on String column. Entities are not enhanced and inserts are committed in a ...