Home » Search

About GeneratedValue

31-40 of 131Refresh
Forum
2

find() cost unreasonable time!

    @GeneratedValue(strategy=GenerationType.IDENTITY) private int id; @ManyToOne @JoinColumn(name ... .persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import ... ") @DiscriminatorValue(value="0") public class Nodes { @Id     @GeneratedValue(strategy=GenerationType
Forum
2

How to use JOIN FETCH?

.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.MapKeyTemporal ... @GeneratedValue private long id;   private String name;   @OneToMany   @MapKeyTemporal(TemporalType.DATE ... ;   } } @Entity public static class Address {   @Id @GeneratedValue private long id;   private String
Forum
2

ID format in objectdb 2.x for JDOHelper.getObjectId

) to LongIdentity. Another option, you can add to your class an ID field: private @Id @GeneratedValue ... .objectdb.OID not LongIdentity. I tried adding private @Id @GeneratedValue long id; but i think ... an ID field anyway:     @Id @GeneratedValue     private long id; This should work
Forum
2

Is it possible to remove parent/child entities without refresh?

.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence ... ; public class ObjectDbRemoveTest { @Entity public static class ParentEntity {   @Id   @GeneratedValue ... {   @Id   @GeneratedValue   private long id;   @ManyToOne(fetch = FetchType.LAZY, cascade
Forum
2

List of Enum Values in an entity

.GeneratedValue; import javax.persistence.Id; import org.eummcr.datastore.model.GuestFlag ... Serializable { private static final long  serialVersionUID = 1L; @Id @GeneratedValue Long ... ();     }     @Entity     public static class MyEntity {         @Id @GeneratedValue Long id
Forum
2

Merge with Parent/Child entities not possible

javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToOne ... public static class ParentEntity {   @Id   @GeneratedValue   private long id;   @OneToMany(fetch ... = id;   } } @Entity public static class ChildEntity {   @Id   @GeneratedValue   private
Forum
2

Remove an entity which attributes were changed - OptimisticLockException

();     }     @Entity     public static class MyEntity {         @Id @GeneratedValue long id ... ; import javax.persistence.EntityManagerFactory; import javax.persistence.GeneratedValue; import ...         @GeneratedValue         long id;         int value;     } }   Thanks. Build 2.8.0_01 should fix it. Thanks. The issue is solved with Build 2.8.0_01. btc_es
Forum
1

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

. My annotations for primary key: @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private String ID; 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. kiki
Forum
1

@MappedSuperclass and @Transient not working as I expected

javax.persistence.EntityManagerFactory; import javax.persistence.GeneratedValue; import javax ... javax.persistence.Version; @MappedSuperclass public class DataObject { @Id @GeneratedValue
Forum
1

@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