ObjectDB ObjectDB

Internal Website Search

61-70 of 144 resultsRefresh
9

@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
9

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
9

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
9

Wrong data stored in time only fields

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

@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
9

"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
9

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
9

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
9

@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
9

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