Internal Website Search

51-100 of 137 results

@MappedSuperclass and @Transient not working as I expected

.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence. GeneratedValue ... @ GeneratedValue protected int id; @Version protected long version; @Transient protected EntityManagerFactory emf

multiple LEFT JOINs do not work as expected

; @ GeneratedValue @Id private long id;         Node parent;    ... , depth, nodeId+"1"); } return node; } @Entity public static final class Node { @ GeneratedValue @Id

Query only works correctly when debug printing results

@ GeneratedValue private long id; private String reqLevelName = "DEF"; @OneToMany(mappedBy ... @ GeneratedValue private long id; @ManyToOne private RequirementLevelEntity wrappingReqLevelEntity

can't get HashMap out of the database

Fields: @Id @ GeneratedValue Long id; private String name; private Date signingDate; private HashMap ... class GuestHolder { // Persistent Fields: @Id @ GeneratedValue Long id; @OneToMany(fetch=FetchType

Inserted entities with strings as keys and indices needs more and more ram memory in comparing to primitive integers as keys and indices

@ GeneratedValue primary keys are sequential. So when you persist multiple new objects their primary ... primary keys. Automatic @ GeneratedValue primary keys are sequential. So when you persist multiple new

Attempt to execute a query using a closed EntityManager

. id is a long field in Client, so it should be there after Client is set. Id has @Id @ GeneratedValue ... () should just return the "long" field which is @Id @ GeneratedValue (strategy = GenerationType.IDENTITY

Error 613 - i cant put a list into a Squad object

.persistence.Entity; import javax.persistence. GeneratedValue ; import javax.persistence.Id; import javax ... ;@ GeneratedValue     private long id;     private int squadId

@Unique member combination not working

;  @ GeneratedValue     private Integer id;     private String ... {         @Id @ GeneratedValue private Integer id;    

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 AUTO public Long getId

Primary key generation problem after changing entity package

@SequenceGenerator(name = "SEQ_BOARD", allocationSize = 5, initialValue = 1) @ GeneratedValue (generator = "SEQ ... ;     @ GeneratedValue (generator = "SEQ_BOARD", strategy = GenerationType.SEQUENCE

Wrong data stored in time only fields

.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence. GeneratedValue ... ;   @Id         @ GeneratedValue (strategy=GenerationType

@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 ... ;  @Id     @ GeneratedValue     private Long key;   

"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 is string have to be assigned a value by the application. support Support

List always null

; @ GeneratedValue (strategy = GenerationType.AUTO)     private Long id;     ... ; @ GeneratedValue (strategy = GenerationType.AUTO)     private Long id;    

Speeding up the creation of Log entity objects related to other objects

{ @Id @ GeneratedValue private long id; @OneToMany(fetch = FetchType.EAGER, cascade={CascadeType ... public class Log { @Id @ GeneratedValue private long id; private LocalDateTime dateTime = null

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 ... ") public List addresses; } @Entity public class Address { @Id @ GeneratedValue (strategy = GenerationType

@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

@ GeneratedValue (strategy=GenerationType.SEQUENCE, generator="seq") private int gid; @Index private int id ... : @Entity public class Language implements Serializable {     @Id @ GeneratedValue // ID

Multi part paths in a composite index must have the same length

; private static final long serialVersionUID = 998L;     @Id @ GeneratedValue long id ... ; public static class OBN {         @Id @ GeneratedValue long id

Why are my Map entries not stored?

Why are my values of the map "states" not stored in the database? It seems the 'State' is stored, but not the 'Authority'? @Entity public class Ticket {     @Id @ GeneratedValue ... public class Authority {     @Id @ GeneratedValue     private

Items in list are doubled, when the entity class is not enhanced

implements Serializable { private static final long serialVersionUID = 1L; @Id @ GeneratedValue private Long ... static final long serialVersionUID = 1L; @Id @ GeneratedValue private Long id; @ManyToOne private

Foreign key constraint issue

; @Id     @ GeneratedValue     private long id;     ...     @ GeneratedValue     private long id;     @OneToMany

Problem with entities detection

; import javax.persistence. GeneratedValue ; import javax.persistence.GenerationType; import javax ... ; @Id @ GeneratedValue (strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "id

Relationships and tracking changes

static final long serialVersionUID = 1L; @Id @Column(name = "ID") @ GeneratedValue (strategy ... ") @ GeneratedValue (strategy = GenerationType.AUTO) private Long id; @ManyToOne @Column(name = "VERLAG

Attempt to store an instance of a non persistable type

.EnumType; import javax.persistence.Enumerated; import javax.persistence. GeneratedValue ; import javax ... @ GeneratedValue @JsonIgnore private long id; @JsonProperty private String uuid = null; @JsonProperty private

Field in Generic Class not persisted?

; import javax.persistence. GeneratedValue ; import javax.persistence.Id; import javax.persistence ... ; @Entity public class OBJ6 extends ABS {      @Id @ GeneratedValue long id;  

Unable to persist fields in subclass

.AccessType; import javax.persistence.Entity; import javax.persistence. GeneratedValue ; import javax ... extends SimpleAbstractPersonTest { /** * */ @Id @ GeneratedValue private long id; private int

Version 2.2.7 build 7/8 issue

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

Mysterious "Attempt to persist a reference to a non managed instance" error

.util.Map; import javax.persistence.Entity; import javax.persistence. GeneratedValue ; import javax ... Index implements Serializable {     @Id @ GeneratedValue private long id;   

How to avoid NULL values on Embedded entities

Hi there. I'm new on this. trying to learn. I'm trying to make a value non nulleable. So, when I try to upload to the DB this field as null, it give me an error. I tried this, but it didn't work: public class Pedido {     @Id @ GeneratedValue     private long id;  

_PersistenceException: Type is not found on getSingleResult.

Greetings. I'm new to ObjectDB. I'm using an ObjectDB local database for a Java SE standalone application and i'm having issues querying for an object of this entity: @Entity public class Estudiante{     @Id     @ GeneratedValue     private Integer id

LifeCycle Event with Embeddable classes

Hello, is there a way that lifecycle events like prepersist or preupdate are also fired for embeddable classes, not just for entities? My case looks as follows: @Entity public class Foo { @Id @ GeneratedValue private Long id; private String description; @OneToMany(cascade = CascadeType.ALL, fetch

query on calendar class

Hello!   I'm looking for help to build query on calendar class. I need to get objects where Calendar.DAY_OF_WEEK is FRIDAY or any other. My class: @Entity public class Cdr {     private static final long serialVersionUID = 1L;        @Id @ GeneratedValue

Immediately retrieve unique id

The beginning of my "Sample" class looks like: @Entity @SequenceGenerator(name = "sampleSeqGenerator", initialValue = 1, allocationSize = 100) public class Sample implements Serializable { private static final long serialVersionUID = 1L; private String sampleName; @ GeneratedValue (strategy

problem with lazy loading - unittest project attached

- please consider: a different GeneratedValue 's strategy  (in ObjectDB the SEQUENCE  

Intermittent: "Attempt to reuse an existing primary key value" when persisting a new instance

using the following annotations for the id:   @Id     @ GeneratedValue (strategy

Mismatch client-server protocol prefix

is annotated with: @Id @ GeneratedValue public Long getId() { return Id; } mosi0815 Ralph Moser Regarding #2

Problem with @UniqueConstraint

" }) }) public static final class CI { @Id @ GeneratedValue long id; @Column (name = "NAME" , nullable = false

Does ObjectDB support @Parent for @Embeddable reference to parent?

instrumentation: @Entity class User implements Serializable { @Id @ GeneratedValue (strategy = GenerationType

find() cost unreasonable time!

="0") public class Nodes { @Id     @ GeneratedValue (strategy=GenerationType.IDENTITY

Error with org.springframework.data.jpa.domain.AbstractPersistable

;   {         @Id @ GeneratedValue     

Problem with distinct select, order by and equivalent alias/attribute path

    @ GeneratedValue (strategy = GenerationType.AUTO)     private Long id

Missing (null) elements in eager loaded references

@ GeneratedValue (strategy = GenerationType. SEQUENCE , generator = "seq" ) private Long id

Performance in SELECT statement

Hello, I have the following 2 entities : @Entity public class TestEntity implements LocalEntity {     @Id     @ GeneratedValue     private Long key;     private Long clientKey;     private String

Failed to commit transaction: Attempt to reuse an existing primary key value (613)

the database is @ GeneratedValue , and at the commit clause it throws the exception. If you could explain

Change Sequcene Id

; @ GeneratedValue (strategy=GenerationType.IDENTITY)     private Long id; }   Tsu

Database size is much larger than expected (x2)

.persistence.Entity; import javax.persistence. GeneratedValue ; import javax.persistence.GenerationType

Bulk Delete and Update - best practice?

public static class CacheData { @ GeneratedValue @Id long id; @Index int hash; String data; public long

JPQL support for mapped by (inverse) collections

;  @Id @ GeneratedValue long id;              ... ; static class B {         @Id @ GeneratedValue long id;   

"is not null" queries not working with index

.persistence.EntityManagerFactory; import javax.persistence. GeneratedValue ; import javax.persistence.Id