About Id

forum_thread

How to delete M2M relationship?

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

 
forum_thread

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: ... public class Foo {   @ Id @ GeneratedValue private Long id ;   private String description ;   @ OneToMany ...

 
api-jpa

javax.persistence.Transient

Specifies that the property or field is not persistent.(Annotation of JPA)

 
forum_thread

Lazy loading does not work - crud takes long

tomee7.0.0SNAPSHOT,objectdb 2.6.4 The OneToMany Entities are filled with 40.000 Records and they have between 20-40 Columns. It takes over 50s to load all Project Enities that contains the OneToMany Relationships. It should be load lazy but i didnt know why the query fetch all the Data. ... implements Serializable {   @ Id @ GeneratedValue ( strategy = ... = "PROJECT_SEQUENCE" ) private Long id ; .. .. @ OneToMany ( cascade = ...

 
api-jpa

javax.persistence.MapKeyColumn

Specifies the mapping for the key column of a map whose map key is a basic type.(Annotation of JPA)

 
forum_thread

Like fails if both underscore and percent are used

When using a like query that has both _ and % in it, ObjectDB seems to fail. Here is a unit test to demonstrate:   ... class StringHolder { @ Id public Long id ;   public String content ;   public ...

 
forum_thread

NullPointerException while setting a new property value

Hello, we are using ObjectDB version 2.4.4 and we are unable to resolve following NPE on enhanced entity: java.lang.NullPointerException at com.objectdb.o.ENT.beforeModifyMember(ENT.java:1099) at model.PluginMetaData.__odbSet_maxAllowedDownloads(PluginMetaData.java:1) at model.PluginMetaData.setMaxAllowedDownloads(PluginMetaData.java:268) at model.PluginMetaData.setPluginDescriptor(PluginMetaData.java:94) PluginMetaData looks like this (nothing extraordinary, no relationship to other @entities): ... class PluginMetaData {   @ Id @ GeneratedValue private Long dbId ;   //persisted info private String id ; private boolean updatesEnabled ; private ...

 
issue

Unexpected exception (Error 990) - Merge with no Transaction

I am frequently having an error when merging a detached object outside of a transaction. (Is this allowed? I am not trying to modify the object, just read data from it.) Here is a test case: ... static class A { @ Id @ GeneratedValue Long id ;   String value ;   A ( String ...

 
forum_thread

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

AFAIK JPA does not directly support an @Embeddable referencing the parent in which it is @Embedded. But Hibernate has a special @Parent for it (see Entity extensions 2.4.3.4.@Parent). @Entity public class Person { @Embeddable public Address address; ... } @Embeddable public class Address { @Parent public Person owner; ... } Is there a safe and recommended way of achieving this in ObjectDB ? ... User implements Serializable { @ Id @ GeneratedValue ( strategy = ... . IDENTITY ) private Integer id ;   @ Access ( AccessType . PROPERTY ...

 
forum_thread

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. ... public class Pedido { @ Id @ GeneratedValue private long id ;   @ Embedded private Direccion origen ; ...