ObjectDB ObjectDB

Internal Website Search

11-20 of 139 resultsRefresh
17

Persist error @ManyToMany how to define correct entities relationships

too). @Entity public class Product implements Serializable { @Id @GeneratedValue ... public static class Product implements Serializable { @Id //@GeneratedValue ... ; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence
7

javax.persistence.TableGenerator

is specified for the GeneratedValue annotation. A table generator may be specified on the entity class or ... _ID", allocationSize=1) @Id @GeneratedValue(strategy=TABLE, generator ... ", pkColumnValue="ADDR_ID") @Id @GeneratedValue(strategy=TABLE, generator="addressGen
3

javax.persistence.SequenceGenerator

javax.persistence Annotation SequenceGenerator Target: Classes and fields (including property get methods) Defines a primary key generator that may be referenced by name when a generator element is specified for the GeneratedValue annotation. A sequence generator may be specified on the entity
3

javax.persistence.Id

: @Id public Long getId() { return id; } Since: JPA 1.0 See Also: Column GeneratedValue Learn
3

javax.persistence.GenerationType

See Also: GeneratedValue Learn how to define and use automatic value generation in Chapter 2 of the ObjectDB
3

Step 2: Entity Class and Persistence Unit

.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax ... serialVersionUID = 1L; // Persistent Fields: @Id @GeneratedValue Long id
3

Step 2: Define a JPA Entity Class

.GeneratedValue; import javax.persistence.Id; @Entity public class Guest implements Serializable ... @GeneratedValue Long id; private String name; private Date signingDate
2

New entity objects are duplicated on merge cascading

();     }         @Entity     public static class Book {         @Id         @GeneratedValue(strategy ... static class Chapter {         @Id         @GeneratedValue(strategy = GenerationType.AUTO ... A {         @Id @GeneratedValue long id;         @OneToOne(fetch = FetchType.LAZY, cascade
2

Step 2: Define a JPA Entity Class

{ private static final long serialVersionUID = 1L; @Id @GeneratedValue private long
2

Step 2: Define a JPA Entity Class

@GeneratedValue private long id; private int x; private int y; public Point

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