ObjectDB Database Search
101-150 of 200 resultsPersist error @ManyToMany how to define correct entities relationships too). @Entity public class Product implements Serializable { @Id @GeneratedValue private long id ... Category implements Serializable { @Id private long id; public Category(int id) { this.id = id ... implements Serializable { @Id //@GeneratedValue private long id; @ManyToMany(cascade=CascadeType.PERSIST | |
General Performance Issues Illustrated with a Specific Method listPatientsByIDsWithBasicData(String ids) { Long st = new Date().getTime(); System.out.println ... ); System.out.println("cs size = " + cs.size()); Long ed = new Date().getTime(); System.out.println ... = GenerationType.AUTO) private Long id; private static final long serialVersionUID = 1L; @Index @OneToOne | |
Inserted entities with strings as keys and indices needs more and more ram memory in comparing to primitive integers as keys and indices programs demonstrate well that automatic long primary keys are indeed much more efficient ... be filled to the maximum with new objects. Long values consume less space than String UID and are processed faster. support Support Thank you for the clarification. The example with long keys needs | |
Optimistic locking: prevent version increment on entity collection attribute; @Id private long id; @OneToMany(mappedBy="document") private ArrayList readings = new ArrayList (); public long ... ; @Id private long id; private Document document = null;   | |
ClassCastException on SELECT NEW ... after UPDATE over Java RMI is (simple bean): public class FileNameDTO { private Long id; private String fileName; public FileNameDTO( Long id, String fileName) { this.id = id; this.fileName = fileName; } public Long getId() { return id; } public void setId( Long id) { this.id = id; } public String getFileName() { return fileName | |
Need help to make this test work and define proper annotations for entities Lists; @Id @GeneratedValue private long id;   ... ; public long getId() {   ... ; public void setId( long id) {   | |
Composite Index error 328 class UsrlistEntity implements Serializable { private static final long serialVersionUID = -4472890635861972890L; private int id; private int dyId; private long pwd; private String usrName; private ... surname; private String job; private String phoneNumber; private Long contactHash; private String | |
Date field Index is corrupted due to time change; em.getTransaction().begin(); Long r = ( Long ... ; em.getTransaction().begin(); r = ( Long ) q ... roundDownDateTime(Date dateTime) { long dateTimeMs = dateTime.getTime | |
Error 363 - Failed to read value of inverse relationship.AUTO) private long id; @ManyToOne(optional=false) private ETown town; public ETown getTown ... implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue private Long ... public class Message implements Serializable { private static final long serialVersionUID = 1L; @Id | |
Is it possible to remove parent/child entities without refresh? { @Entity public static class ParentEntity { @Id @GeneratedValue private long id ... (), child); } public long getId() { return id; } public void setId( long id) { this.id = id; } } @Entity public static class ChildEntity {   | |
Wrong data stored in time only fields; Long r = ( Long ) q.getSingleResult();   ... ) { long dateTimeMs = dateTime.getTime(); long reminderMs = dateTimeMs % 1000;   | |
TemporalType injection with Calendar using JPA Calendar may be supported in the future - but as long as it is not portable JPA - it should be avoided ... have replaced the Calendar fields with " long " data types which represent the millisecond value of the Date ... TimePeriod implements Serializable { private long beginTime; private long endTime; private String | |
Multi part paths in a composite index must have the same length; private static final long serialVersionUID = 998L; @Id @GeneratedValue long id; @Index private Long instrumentId; private SafeLong tStamp; The SafeLong class is a very simple wrapper of a long - @Embeddable public class SafeLong | |
IDs of Entities suddenly became UUIDs? do have a UUID String as their id instead of Long which is of course causing a lot of troubles. Note that this even occurrs on the same "Table" -- some saved Entitities of same type do still have a Long ID, others a String UUID. Our Base-Entity everything inherits from is declared as usual with Long | |
EmbeddedId with Generated field value ********* @Entity @IdClass(CompositePK.class) public class A { @Id private long uid ... ;private long uid; private String zone; } ********* Solution 2 ... { private long uid; private String zone; } In | |
Failing to read entities under load in multithreaded tests TestIdHolder implements Serializable{ private static final long serialVersionUID = 1L; private long version; private long longId;   ... ="TestIdTableGen") public long getLongId() {   | |
Database Inconsistency or corruption", valueColumnName = "idValue", pkColumnValue = "objectValueId", allocationSize = 1) protected Long id; private String type; private Long revision; protected boolean ... ; String type, Long revision, Project project | |
Should derived fields of an EmbeddedId be manually maintained by app code? + numberToGen; int startCnt = lastInstanceInMap; long timing = System.currentTimeMillis(); while (endCnt ... "); q.setParameter("container", this); q.setFlushMode(FlushModeType.AUTO); try { long l = ( Long ) q ... implements Serializable { private static final long serialVersionUID = 0L; private String cachedKey; private | |
Unable to persist fields in subclass) public abstract class SimpleAbstractPersonTest { private long addressID; private long contactID ... lastNameProperty() { return lastName; } public final long getAddressID() { return addressID; } public final void setAddressID( long id) { if (id 0) addressID = id; } public final long getContactID | |
jakarta.persistence.criteria.ParameterExpression expressions to Integer , Long , Float , and Double . Support for typecasts between other basic types is not | |
jakarta.persistence.criteria.Root expressions to Integer , Long , Float , and Double . Support for typecasts between other basic types is not | |
jakarta.persistence.criteria.Subquery to Integer , Long , Float , and Double . Support for typecasts between other basic types is not | |
jakarta.persistence.criteria.SetJoin casting scalar expressions to String , and String expressions to Integer , Long , Float , and Double | |
jakarta.persistence.criteria.CriteriaBuilder.Case casting scalar expressions to String , and String expressions to Integer , Long , Float , and Double | |
jakarta.persistence.criteria.CriteriaBuilder expression applying the sum operation to an Integer-valued expression, returning a Long result | |
jakarta.persistence.criteria.CriteriaBuilder.In , Long , Float , and Double . Support for typecasts between other basic types is not required | |
jakarta.persistence.criteria.CriteriaBuilder.Coalesce casting scalar expressions to String , and String expressions to Integer , Long , Float , and Double | |
jakarta.persistence.criteria.CollectionJoin , Long , Float , and Double . Support for typecasts between other basic types is not required | |
jakarta.persistence.criteria.Expression are required to support casting scalar expressions to String , and String expressions to Integer , Long | |
jakarta.persistence.criteria.CriteriaBuilder.SimpleCase to support casting scalar expressions to String , and String expressions to Integer , Long , Float | |
jakarta.persistence.criteria.ListJoin to support casting scalar expressions to String , and String expressions to Integer , Long , Float | |
jakarta.persistence.criteria.From scalar expressions to String , and String expressions to Integer , Long , Float , and Double . Support | |
jakarta.persistence.criteria.Join to Integer , Long , Float , and Double . Support for typecasts between other basic types is not | |
jakarta.persistence.OrderColumn column value for the first element is 0 . Example: @Entity public class CreditCard { @Id long | |
Join query problem with new statetment Serializable { private static final long serialVersionUID = 1L; private long inspID; private String inspName; private long productID; private String productName;   | |
Visibility of changes in Transaction is not visible to a JPA QL Query to see that they have been added long newTotal = -1; try { InitialContext ... ; .lookup("SLSBObjDb"); long oldAmount = bean.countItems(); bean.addItems ... ; lastInstance = startCnt; } } public long howManyItemsExist(EntityManager em) {   | |
Merge with Parent/Child entities not possible { @Id @GeneratedValue private long id; @OneToMany(fetch = FetchType.LAZY ... (this); children.put(child.getChildName(), child); } public long getId() { return id; } public void setId( long id) { this.id = id | |
failure to enforce NOT NULL for java.lang.String.IDENTITY) private Long id; @Unique @Persistent(nullValue=NullValue.EXCEPTION) private String username; public Long getId() { return id; } public void setId( Long id) { this.id = id; } public String ... Long id; @Unique   | |
Query on Embedded Primary Key?; public OBJ2() { } public OBJ2( long field1, long field2) { primkey = new Primkey2(field1, field2 ... Primkey2 implements Serializable { public long field1; public long | |
Criteria query error: Unexpected query token BaseEntity{ /** * */ private static final long serialVersionUID = 613965399994067819L; public ... long serialVersionUID = -7979088681300801112L; /** * Primary key for entity */ @Id // @GeneratedValue ... ) @GeneratedValue private Long id; /** * Version of object, supporting optimistic lock */ @Column (name = "opt | |
Object as parameter results in exception; . @Id private Long id; } and the query: @Override public T fetch(Company company, Long primaryKey) { mLogger.info("Fetching type: {} with id ... ;@Override public T fetch(Company company, Long primaryKey) { mLogger.info("Fetching type | |
JPQL keyword in entity - what to do?; public Long all; public ResultData(String prodType, Long all) {   ... It seems that the constructor is not found - try changing the 2nd argument from Long to long . support ... was modified like this: public class ResultData { public String name; public long all; public boolean | |
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 ... customer; } public void setCustomer(Customer customer) { this.customer = customer; } public Long getId | |
Duplicate Entity class names causes Exception in Query (NoResultException e) { return null; } } public long howManyItemsExist(EntityManager em) { TypedQuery q = em.createNamedQuery("objdbTest.Singleton.count", Long .class); q.setFlushMode(FlushModeType.AUTO); try { return ... static final long serialVersionUID = 2215109025397291357L; } If I change the query to @NamedQuery | |
jakarta.persistence.criteria.CriteriaBuilder.sumAsLong(Expression) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression sumAsLong ( Expression x ) Create an aggregate expression applying the sum operation to an Integer-valued expression, returning a Long result. Parameters: x - expression representing input | |
jakarta.persistence.criteria.Expression.cast(Class) to support casting scalar expressions to String , and String expressions to Integer , Long , Float | |
After using the enhancer, Lazy loaded collections are no longer loading. They are set as null(strategy= GenerationType.TABLE) protected Long id; @Override public Long getId() { return id; } @Override public void setId( Long id) { this.id = id; } @OneToMany(cascade={CascadeType.MERGE ... { @Id @Column(name = "project_id") @GeneratedValue(strategy= GenerationType.TABLE) protected Long id | |
[ObjectDB 2.2.5_02] Unexpected exception (Error 990) com.objectdb.o.InternalException: java.lang.NullPointerException: null TimePeriod implements Serializable { private long beginTime; private long endTime; private String periodType; public long getBeginTime() { return beginTime; } public void setBeginTime( long beginTime) { this.beginTime = beginTime; } public long getEndTime() { return endTime; } public void setEndTime( long | |
InternalException when using MEMBER OF on a large list in a query that combine large objects with long primary keys. In such objects the keys may not be embedded in ... the exception - storing large objects with long primary keys is not very efficient, because non embeddable ... they seem to be 36 bytes). support Support Thanks for the fix. Also thanks for the hint with long keys | |
When using inheritance, you can specify, which ID to use long id; String field1; } public EntityB() extends EntityA() { @Id long id;   ... EntityA() { String field1; public abstract long getID();   |