Internal Website Search

101-150 of 200 results

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

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

    @GeneratedValue(strategy = GenerationType.AUTO)     private Long id ... ;   }     public Street( Long id, String name, Location location) {   ... ; }     public Long getId() {         return id;  

Performance in SELECT statement

Long key;     private Long clientKey;     private String ... ;   private long timestamp;     @Embedded      ... State {     private Long lastProcessingDate;     private int

Bulk Delete and Update - best practice?

.createQuery("SELECT COUNT(d) from CacheData d", Long .class); long rows = q.getSingleResult ... .createEntityManager(); q = em.createQuery("SELECT COUNT(d) from CacheData d", Long .class); rows = q.getSingleResult ... public static class CacheData { @GeneratedValue @Id long id; @Index int hash; String data; public long

Inconsistent return types from JDO query

produced by the Query is inconsistent - sometimes Integer, sometimes Long .  Using setResultClass( Long .class) has no effect. sjzlondon Steve Zara The type of a sum expression depends on the type of the field on which it works, but should be long for both int and long fields. Please post

ID format in objectdb 2.x for JDOHelper.getObjectId

Bhaskar In ObjectDB 1.x object IDs where always unique long numbers, so these numbers could represent ... : private @Id @GeneratedValue long id; // JPA code and then the ID will be injected automatically ... @Id @GeneratedValue long id; but i think it only works in case of JPA not with JDO. Do you the any

More Efficient Primary Keys

Primary Key  with two Longs b) Embedded Primary Key with two Longs c) Furthermore, as String ... , how much performance improvement would bring a switch to a single long ? btc_es BTC EmbeddedSystems Unfortunately ... , and a single long is more efficient (and better if allocated sequentially rather than randomly). It is unclear

Feature Request for database.obj$ file

there is a background thread, merging the database.obj and the database.obj§ files. As long as this daemon ... it might be because a user holds a snapshot of the database for a long time (i.e. an EntityManager after flush that is not closed). It is a good practice to use a long -lived EntityManagerFactory

List of Enum Values in an entity

implements Serializable { private static final long   serialVersionUID = 1L; @Id @GeneratedValue Long        id; private String     name; private ... .createEntityManager();         Long id = entity.id;   

Does ObjectDB support lazy loading?

.persist(a); em.getTransaction().commit(); Long id = a.id; em.close(); em = emf.createEntityManager ... A { @Id @GeneratedValue Long id; @OneToMany(fetch=FetchType.LAZY, cascade=CascadeType.ALL) List list; } @Entity static class B { @Id @GeneratedValue public Long id; int value; B(int value

Beginners questions

implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(name = "ID") @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @OneToMany (fetch=FetchType.LAZY,cascade ... ") public class EBUser extends Pojo implements Serializable{ private static final long serialVersionUID = 1L

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

static final long serialVersionUID = 1L;     @Id     @GeneratedValue     private long id;     private int squadId;     private int athletId;     public long getId() {   

500Mb ObjectDb database opening issue

) for following code long time = System.currentTimeMillis(); m_EntityMgrFactory = Persistence ... to speed-up open time for big databases? Definitely, it's too long for 500 Mb database! We gonna ... which show problem with long data base open operation issue. Could you check from ObjectDb

How to use JOIN FETCH?

class Person {   @Id @GeneratedValue private long id;   private String name;   ... ();   public long getId() {    return id;   }   public String getName() {   ... ;   } } @Entity public static class Address {   @Id @GeneratedValue private long id;  

com.objectdb.o.NLV cannot be cast to com.objectdb.o.CMV

Long id;     private Long version;     :       ... ; }) public class RecordingMetaData {     private Long id;     private Long version;         private Date startDate;    

Object DB vs EclipseLink/TopLink: Unloaded relationships in detached entities

_persistence_context_in_stateful This however has the consequence of a long conversation until the stateful ... and will able able to use it as long as the EntityManagerFactory is open. The connection used in not ... lazy relationships after they are detached as long as the context is still avalable

List always null

;  private static final long serialVersionUID = 1L;     @Id     @GeneratedValue(strategy = GenerationType.AUTO)     private Long id;     ... static final long serialVersionUID = 1L;         @Id    

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

Extra uninitialised entities spawned on merge()

().commit();         Long id = root.getId();      ... ;     }         private Long id;    ... ;       public Long getId() {        

Relationships and tracking changes

static final long serialVersionUID = 1L; @Id @Column(name = "ID") @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @OneToMany (fetch=FetchType.LAZY,cascade=CascadeType.ALL, mappedBy ... implements Serializable{ private static final long serialVersionUID = 1L; @Id @Column(name = "ID

Field in Generic Class not persisted?

; @Entity public class OBJ6 extends ABS {      @Id @GeneratedValue long id;     private long valInInstanceClass;     public OBJ6() {     }     public OBJ6( Long l ) {         super(l);  

Issue with orphanRemoval and multiple EntityManagers

;     long orgId = 0;            ... ;  @Id         private long id;       ... ();         }         public long

Problem with byte arrays in JDO - internal exception

; /** * * @author steve */ public class Example { private long id; private String name; private byte[] data; /** * @return the id */ public long getId() { return id; } /** * @param id the id to set */ public void setId( long id) { this.id = id; } /** * @return the name */ public String getName() { return

EntityManager refresh problem

SimpleEntity {     @Id @GeneratedValue private Long primaryKey;     ... ;   public Long getPrimaryKey() {         return primaryKey;     }     public void setPrimaryKey( Long primaryKey) {  

Problem with byte arrays in JDO - ClassCastException

; } } package spiffy.test.model; /** * * @author steve */ public class Example { private long id; private String name; private byte[] data; /** * @return the id */ public long getId() { return id; } /** * @param id the id to set */ public void setId( long id) { this.id = id; } /** * @return the name

Join performance in Objectdb

select count(e.id) from Page e 1 java.lang. Long : 161143 Time : 23.889999 JPQL select count(e.sUrl) from Page e 1 java.lang. Long : 161143 Time : 96.968002 JPQL select count(e.iSize) from Page e 1 java.lang. Long : 161143 Time : 10.359000 JPQL The command tool is from the book of Mike Keith. Obviously

NoSuchFieldError: __odbTracker on NetBeans 7.3 + JBoss 7.1.1

+ Jboss 7.1.1 @Entity public class Person extends AbstractObject { private static final long ... = citys; } } @Entity public class City extends AbstractObject { private static final long ... IAbstractObject { //private static final long serialVersionUID = 1L; @Id private String id = UUID

Great product - needs better marketing - more popularity

was more popular. Moreover, companies ask if they can rely on an unknown vendor with their long term software ... sales point to me.) I would see long term viability as being the hardest marketing problem ... point for customers that are concerned about their long term software development investment. Any

Modifying something with Explorer -> app JPQL with Enum doesn't work anymore

with how enums are handled. I can do whatever I want with the application, as long as I avoid ... encountered this I had to remove @Enumerated with Long , and add ids for each Enum in my logic, because using @Ordinal is not proper for long term, when you have to add/remove options. I hope the problem

EntityManager JPA or JDO impl and different behavior

;       long id = 1;         List ... ;    public long getId() {           ... ;          public void setId( long id) {    

Query only works correctly when debug printing results

@GeneratedValue private long id; private String reqLevelName = "DEF"; @OneToMany(mappedBy ... implements Serializable { /** * */ private static final long serialVersionUID = 5019171545896480392L; @Id @GeneratedValue private long id; @ManyToOne private RequirementLevelEntity wrappingReqLevelEntity

can't get HashMap out of the database

class Guest implements Serializable { private static final long serialVersionUID = 1L; // Persistent Fields: @Id @GeneratedValue Long id; private String name; private Date signingDate; private HashMap ... class GuestHolder { // Persistent Fields: @Id @GeneratedValue Long id; @OneToMany(fetch=FetchType

Conflicting modifiers .... (javax.persistence.Id, javax.persistence.ManyToOne)

= em .createNamedQuery("numberOfMapItems"); q.setFlushMode(FlushModeType.AUTO); try { long l = ( Long ... long serialVersionUID = 0L; private String cachedKey; private String container; public

Problem witch CriteriaBuilder isMember(..)

;   testobject = new Testclass(0,0); } @Embeddable class Testclass {     long uid = 0;     long udb = 0; } Im unable to search for some occurence of Objects of Testclass in ... _list Predicate test_predicate = expression.in(uid3_list); // works fine as long there is no previous

Saving custom list which implements java.util.List fails

long as they are declared as java.util.List So the same example runs with db4o and Hibernate but not ... : So shouldn't it be possible to store any kind of list, as long as it is an instance of java.util.List? Because it doesn't matter how the list is implemented as long as you can get and set the list

Fields in objects not populated in query result.

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

JDOHelper.isDetached failure ?

implements Serializable { @PrimaryKey private long id; private String name; protected TestClass() { } public TestClass( long id,String name) { this.id = id; this.name = name; } /** * @return the name */ public String getName() { return name; } /** * @return the id */ public long getId() { return id

Out of memory

;That problem was moved to a separate issue , since this thread became too long . Please subscribe ... chance to add some logging for long / memory hungry queries? And lastly - now our database is small ... that there is always enough spare space. As long as there are no memory leaks in ObjectDB - increasing

mappedBy problem

.IDENTITY) public Long id; public String name; @OneToMany(targetEntity=Address.class,mappedBy="employee ... .IDENTITY) public Long id; public String line; @ManyToOne public Employee employee; } The address ... (Employee) is retrieved or refreshed from the database - as long as the owner side is set

Remove an entity which attributes were changed - OptimisticLockException

;   @Id @GeneratedValue long id;         int value ... ; long removedID = e.id;         em.remove(e); // remove e   ... ;     @GeneratedValue         long id;  

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();    

New entity objects are duplicated on merge cascading

;      private Long id;           ... )         private Long id;     }     ... A {         @Id @GeneratedValue long id;     

Tracking changes to new collections (in enhancement mode) after flush

;       em.flush();          long id = entity.id ... ;  public static class ListInMap {         private @Id long id ... (entity);         em.flush();          long

Unexpected exception (Error 990) on find

, and there comes only Exceptions when the values becomes sometimes relativly long ( 256 chars). When I cut ... ? Is it String? What is the length of these strings? You mentioned long strings as map values, but in this context, long strings as entity keys could be more relevant. Please check the database file using