ObjectDB ObjectDB

Internal Website Search

61-70 of 144 resultsRefresh

@Unique member combination not working

Why does the below code not enforce unique restrictions? Person @Entity @Unique(members = {"name", "surname"}) public class Person implements Serializable {     @Id     @GeneratedValue ... Serializable {         @Id @GeneratedValue private Integer id;         private String name

On ensuring ID available after persist

up to another element) I am using the following for the ID: @Id //@GeneratedValue(strategy = GenerationType.AUTO)// Explicit for EclipseLink + Oracle or MySQL @GeneratedValue//ObjectDB takes as

Primary key generation problem after changing entity package

) @GeneratedValue(generator = "SEQ_BOARD", strategy = GenerationType.SEQUENCE) lwalkowski Lukasz ... _BOARD", allocationSize = 5, initialValue = 1)         @GeneratedValue(generator = "SEQ_BOARD

Wrong data stored in time only fields

.EntityManagerFactory; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType ...         @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="DateTime_sequence

@OneToOne query issue with OR and IS NULL

Hello, I'm struggeling to get a query run right. I have 2 entities (simplified) class A {     @Id     @GeneratedValue     private Long key;          @OneToOne(mappedBy = "other", cascade = CascadeType.ALL)         private B another } class B {     @Id     @GeneratedValue

"Unsupported auto value type java.lang.String" when persisting new instance

for primary key: @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private String ID; kiki Kristijan You cannot use @GeneratedValue for string Id only for numeric Ids. Id fields whose type

List always null

I have the following classes: @Entity public class Noticia implements Serializable {     private static final long serialVersionUID = 1L;     @Id     @GeneratedValue(strategy ... static final long serialVersionUID = 1L;         @Id     @GeneratedValue(strategy = GenerationType

mappedBy problem

If I put the mappedBy element to the @OneToMany, the owned side (the many side) will never persist ! for example @Entity public class Employee { @Id @GeneratedValue(strategy = GenerationType ... { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public Long id; public String line

@SequenceGenerator and single id in whole database

both the strategy and the generator attributes of the @GeneratedValue annotation. By using the IDENTITY ... (name = "XXX", sequenceName = "Seq_XXX", initialValue = 1000) @GeneratedValue(generator = "XXX") @Id

Trouble bug on explorer

", initialValue=10000) @Entity public class User implements Serializable { @Id @GeneratedValue ... {     @Id @GeneratedValue // ID will be generated automatically     private int         langId

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