ObjectDB ObjectDB

Internal Website Search

31-40 of 144 resultsRefresh

Is it possible to remove parent/child entities without refresh?

.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence ... ; public class ObjectDbRemoveTest { @Entity public static class ParentEntity {   @Id   @GeneratedValue ... {   @Id   @GeneratedValue   private long id;   @ManyToOne(fetch = FetchType.LAZY, cascade

Merge with Parent/Child entities not possible

javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToOne ... public static class ParentEntity {   @Id   @GeneratedValue   private long id;   @OneToMany(fetch ... = id;   } } @Entity public static class ChildEntity {   @Id   @GeneratedValue   private

How to use JOIN FETCH?

.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.MapKeyTemporal; import ... ); // Address is shown as null.   } } @Entity public static class Person {   @Id @GeneratedValue ... ;   } } @Entity public static class Address {   @Id @GeneratedValue private long id;   private String address

ID format in objectdb 2.x for JDOHelper.getObjectId

: private @Id @GeneratedValue long id; // JPA code and then the ID will be injected automatically ... @GeneratedValue long id; but i think it only works in case of JPA not with JDO. Do you the any ... @GeneratedValue     private long id; This should work also with JDO, because you may mix JPA

Database Inconsistency or corruption

@javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.TABLE, generator ... .IAttribute { @javax.persistence.Id @javax.persistence.GeneratedValue(strategy=javax.persistence ... implements Serializable, metamodel.IValue { @javax.persistence.Id @javax.persistence.GeneratedValue

Criteria query error: Unexpected query token

= -7979088681300801112L; /** * Primary key for entity */ @Id // @GeneratedValue(strategy ... ", initialValue = 1, allocationSize = 50) // @GeneratedValue(strategy = GenerationType.SEQUENCE) @GeneratedValue private Long id; /** * Version of object, supporting optimistic lock

Remove an entity which attributes were changed - OptimisticLockException

{         @Id @GeneratedValue long id;         int value;     } } Version 2.6.8 fixes the bug. support ... javax.persistence.EntityManagerFactory; import javax.persistence.GeneratedValue; import javax ... ();     }     @Entity     public static class MyEntity {         @Id         @GeneratedValue

Can a Set<E> be a foreign key?

{     @Id @GeneratedValue     private long characterId;     private String characterName;     private Location characterLocation; and: @Entity public class Cell {     @Id @GeneratedValue ... can do this safely and retrieve it nicely later on: @Entity public class Cell {     @Id @GeneratedValue

Bug: ClassCastException by retrieval

; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax ... .close();   emf.close(); } } @Entity class Node<TN> { @Id     @GeneratedValue(strategy

"is not null" queries not working with index

.persistence.EntityManagerFactory; import javax.persistence.GeneratedValue; import javax.persistence ... ;         @Id @GeneratedValue private long id;         @Index private Integer bar;         public

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support