Internal Website Search

101-137 of 137 results

How to delete M2M relationship?

In user model class I have the following: public class User implements Serializable {     @Id     @ GeneratedValue (strategy = GenerationType.AUTO)     private Long id;     @ManyToMany(mappedBy = "attendees", cascade

@Column( name = "columnName") doesn't work

I have created following entity class with custom fields @Entity public class AfwDataKey { @Id @ GeneratedValue @Column(name = "KEY_ID") private long id; private Long timestamp; @ManyToOne @Column(name = "KEY_DESCRIPTOR") private AfwKeyDescriptor keyDescriptor; @OneToMany(fetch = FetchType.LAZY

Null returned by Persistence.createEntityManagerFactory

; @Entity public class Task implements Serializable { @Id @ GeneratedValue int id; //int id = 0; private

Error: Failed to write value of field X using reflection (oneToMany relation)

Hi there! I have been all day trying to solve this. I have read multiple sites and documentation, but I can go through this. I have a clase named Pedido, that have a reference ManyToOne to a clase Cliente. @Entity public class Pedido { @Id @ GeneratedValue private long id; @Embedded private

LAZY @ManyToOne field functions as EAGER

;  @ GeneratedValue         Long id;     

Possible issue for default id generator

and 36: @ GeneratedValue (strategy=GenerationType.SEQUENCE)//, generator="seq") @Id @SequenceGenerator

java.sql.Timestamp.getTime() not working

Player { @Id @ GeneratedValue (strategy = GenerationType.IDENTITY) public int id; @Temporal(TemporalType

Fields in objects not populated in query result.

, Serializable { /** * */ private static final long serialVersionUID = 1L; @ GeneratedValue @Id protected long

Cascading merge() leading to "Attempt to persist a reference to a non managed instance" error

static final class Child {     @Id     @ GeneratedValue    

Failing to read entities under load in multithreaded tests

;   @Id     @ GeneratedValue (strategy=GenerationType.TABLE, generator

@ElementCollection of type enum

;     @Id @ GeneratedValue Long id;          

NullPointerException while setting a new property value

): @Entity final public class PluginMetaData { @Id @ GeneratedValue private Long dbId; //persisted

Removing an entity throws exception

serialVersionUID = 1L; @Id @ GeneratedValue private Long id; private String name; private String surname

c.o.jpa.type.EntityTypeImpl.getIdType() returns null

; @Id     @ GeneratedValue     private Long id; persistence

Entity with java.util.Date column gives ClassCastException in BIRT

class Patient {     @Id     @ GeneratedValue (strategy=GenerationType

2.7.3_03 Erroneous "Attempt to modify a primary key of a managed object"

AuEntity implements Serializable { @Id @ GeneratedValue long id } it's the ONLY place in the entire

Newbie : How to return the auto-generated ID

Hello, I am new to this community, as well as JPA and ObjectDB. I want to read the auto-generated ID when I persist a new entity (with @Id @ GeneratedValue annotations applied). I am following the following link : http://www.objectdb.com/tutorial/jpa/eclipse/web/entity Thanks. zombie

How to pass a list in query for a list field of entity.

I have a entity as bellow :- @Entity @Table(name = "agent") public class Agent implements Serializable { @Id @ GeneratedValue (strategy = GenerationType.AUTO) private Long Id; private List SocialMedias; public Agent() { } public Long getId() { return Id; } public List getSocialMedias() { return

Should I be able to persist a JFrame (or gui components in general)?

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

Mapped (Inverse) LAZY @OneToMany vs. Unmapped LAZY @OneToMany

; @Id         @ GeneratedValue       

Lazy loading does not work - crud takes long

; @ GeneratedValue (strategy = GenerationType.SEQUENCE, generator = "PROJECT_SEQUENCE")    

Null enums and IS (NOT) NULL: NullPointerException

class TEntity { public enum ExampleEnum { P1, P2 } @Id @ GeneratedValue (strategy = GenerationType

Extra uninitialised entities spawned on merge()

;      @Id         @ GeneratedValue  

Object comparation never matches

;   @Id @ GeneratedValue     private Long id; public void setPrincipal

How to query for list of lists ?

{ private static final long serialVersionUID = 1L; @Id @ GeneratedValue (strategy = GenerationType.IDENTITY

How to apply constraints in collection attributes of entity.

How to apply constraints like unique, not null ...etc in collection attribute of a entity. Example : @Entity @Table(name = "agent") public class Agent implements Serializable { @Id @ GeneratedValue (strategy = GenerationType.AUTO) private Long Id; private List PhoneNumbers; public Agent() { } public

How to create a Unique constraint?

Hi, I'm trying to create a unique constraint. Here is a simple example: @Entity public class Account { @Id @ GeneratedValue private long id; @Index(unique="true") private String name; } The code runs and my Account objects are persisted. But no exception is thrown if name is the same. What do I

Navigation through Path to evaluate collection

ProductData implements Serializable {     @Id @ GeneratedValue     private

Problem with bidirectional link

the problem by annotating the id field with @ GeneratedValue . I will check how the error message that ObjectDB produces in this case can be improved. support Support

Problem to use find method on an abstract Class: AbstractMethodError is thrown

static class B extends A {         @Id @ GeneratedValue Long id

Possible issue with String fields

@ GeneratedValue private long id; String company_pkey; String external_booking_ref; @Temporal(javax

Unexpected exception when execute query without enhanced entities

{         @Id @ GeneratedValue         int uid

Unexpected exception (Error 990) - Merge with no Transaction

;   @ GeneratedValue         Long id;  

Explorer bug ? Objects seem to be missing from database in Class view, but are present as references

that under @ID @ GeneratedValue AUTO strategy with ObjectDB (unlike with EclipseLink+MySQL or EclipseLink

NPE when doing a find()

I added a simple User entity during Tomcat startup: class User {  @Id @ GeneratedValue private long id; @Basic(optional = false) private String firstName; private String middleName; @Basic(optional = false) private String lastName; } Everything works fine until I restart the server, which does

boolean field flips after schema update (in class) of another field

public class Configuration { @Id @ GeneratedValue private long id; @Embedded private Application

com.objectdb.o.InternalException: java.lang.ArrayIndexOutOfBoundsException: null

; @ GeneratedValue     long id;     public WebReference() {