ObjectDB Database Search
101-150 of 200 resultsUsing the wrong class to access a database(); for ( int i = 0; i = 100) { em.remove(p); // delete entity } else { p.setX(p.getX() + 100); // update ... javax.persistence.Entity; @Entity public class Point { // Persistent Fields: private int x; private int y; // Constructor: Point ( int x, int y) { this.x = x; this.y = y; } // Accessor Methods: public int | |
Duplicate Entity class names causes Exception in Query int version; @Basic protected java.lang.Integer lastInstance; public void generateItems(EntityManager em, int howMany) { if (lastInstance == null) { lastInstance = 0; } int endCnt = lastInstance + howMany; int startCnt = lastInstance; while (endCnt startCnt) { startCnt++; Item item = new Item | |
Database size is much larger than expected (x2) I store images into objectdb. The schema is : ::=( , , , , ) ::=String ::=char ::= int ::=byte ... ; EntityManager em = emf.createEntityManager(); for ( int i = 0; i by ... .InheritanceType; public class URIReader { public static int read( int iNumber){ int i = 0; int | |
multiple LEFT JOINs do not work as expected; private static Node persistTree(EntityManager em, Node parent, int depth) {   ... ; int depth;   ... ; Node(Node parent, int depth | |
EntityTransaction.commit() does not release a pessimistic lock private int no; private int balance; public Account( int n) { no = n; balance = 1000; } public int getNo() { return no; } public int getBalance() { return balance; } public void credit( int a) { balance | |
problem using macbook with M1 chip?; iconst_1 2 ldc [1] 4 invokespecial com.objectdb.o.HTB( int ... [] d( int arg0); 0 iload_1 [arg0] 1 anewarray com.objectdb.o ... () : int [18] 8 ldc [19] 10 iand 11  | |
Efficient query on EmbeddedId Hi! I have an entity class with an @EmbeddedId (field1 int and field2 int ). Based on the manual, I ... on an @Entity field? Example: int carId or @ManyToOne Car car (which has an int id) (I know ... difference. An index on an int value is a bit more efficient. This is because a reference type is larger | |
Find the error...JPA ENTITY HIBERNATE") @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; @Column(name = "username") private ... (Set messages) { this.messages = messages; } public int getId() { return id; } public void setId( int id) { this.id = id; } public String getUsername() { return username | |
find() cost unreasonable time!) private int id; @ManyToOne @JoinColumn(name="parent") protected Nodes parent; @OneToMany(mappedBy ... getSons0() { System.out.printf("===========%n"); int iSum = 0; for ( int i=0;i 0 ... /timecost); } private static void getSons0() { System.out.printf("===========%n"); int iSum = 0; for ( int i=0;i | |
Problem with entities detection_nacimiento") @Temporal(TemporalType.DATE) private Date fecha_nacimiento; private int [] telefonos ... { /** * */ private static final long serialVersionUID = 1L; String ciudad; String calle; int numero; int codigo_postal; public Direccion() { } public Direccion(String ciudad, String calle, int numero, int | |
Error using query with MAX() function = "mySchema") public class TestEntity { @Id private int id; @Basic @Lob private String remark; @Basic @Temporal(value = TemporalType.TIMESTAMP) private Date changeDate; public int getId() { return id; } public void setId( int id) { this.id = id; } public String getRemark() { return remark; } public | |
Cascading makeTransient { private int fieldInt; private String fieldString; private HashMap fieldMap; private ArrayList ... ( int fieldInt){ this.fieldInt = fieldInt; this.fieldString = ""+fieldInt;   ... ); } public int getFieldInt() { return fieldInt; } public void setFieldInt( int fieldInt) {   | |
persisting object with long[][] arrays of array script - which takes about 50sec to complete on my mac. private static long[][] random2( int n){   ... .createEntityManager(); int n = 100_000;   ... ; } } and the test code took less than 1sec to complete: private static long[] random2( int n){   | |
Join performance in Objectdb; int entityCount = 160000;   ... ; em.getTransaction().begin(); for ( int i = 0; i ... ; EntityManager em = emf.createEntityManager(); int entityCount | |
Database(*.odb) file size on disk; public final class createAndDelete { static int idCounter = 1; public static void main(String[] args ... .setFlushMode(FlushModeType.AUTO); int objects = 1000; int loops = 3; for ( int iteration = 0; iteration | |
Query on Embedded Primary Key?; public int hashCode() { int hash = 5; hash = 79 * hash + ( int ) (this.field1 ^ (this.field1 32)); hash = 79 * hash + ( int ) (this.field2 ^ (this.field2 32));   | |
em.flush(); em.clear(); loosing data and not persisting managed objects") public class TestEntity { @Id private int id;   ... ; public int getId() { return id; } public void setId( int id) { this.id = id;   | |
Question about modification; int valor = menu.nextInt();   ... ; int numeroObjetosModificados = consulta.executeUpdate();   ... ; int numeroObjetosModificados | |
Null returned by Persistence.createEntityManagerFactory; @Entity public class Task implements Serializable { @Id @GeneratedValue int id; // int id = 0; private ... cmTicket = ""; private int leadTimeDays = 0; private String type = "System-Generated"; public Task(String ... = approvalGroup; } public int getId(){ return id; } } The problem comes up when I attempt | |
Multiple inputs not supported on WHERE ?; default int updateUserEnabled(Boolean enabled , Integer sicilNo, Cache loginCache) {   ... ; int updateUserEnabledInternal = updateUserEnabledInternal(enabled, sicilNo);   ... ; return updateUserEnabledInternal; } int updateUserEnabledInternal | |
500Mb ObjectDb database opening issue; +---com.objectdb.o.CFG.an( int )   ... .*; public class T1792 { public static void main(String[] args) { String path = "temp.odb"; for ( int i = 0 | |
Field not persisted in abstract class with two level of nesting public int hashCode() { int hash = 7 ... ; @Override public int hashCode() { int hash = 7; return hash; } } I | |
Multi-thread access to single EM's entities; private int value; public PointlessEntity( int value) {   ... ; synchronized public int getValue() {   | |
Weird behaviour with enhanced classes and embedded entities; int id; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType ... ; = new ArrayList (0); public MyEntity( int id) {   ... ("Done"); } private static void addEntities( int id){ MyEntity entity | |
Bug: ClassCastException by retrieval class Node { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) int id ... .toCharArray(); int iLen = ca.length; Character[] la = new Character[iLen]; for ( int ii = 0; ii | |
EntityManager refresh problem; private String fieldA; private int fieldB; public String ... = fieldA; } public int getFieldB() { return fieldB; } public void setFieldB( int | |
Queries are slow on a large database implements Message, LogItem, Comparable { private int Id; private int logTestRunId; private int logEntryId | |
Does aggregate function "greatest" work on entity objects? final long serialVersionUID = 1L; @Override public int compareTo(Object t) { //Logger.getLogger("------------").log(Level.INFO, this.toString() + " compareTo " + t.toString() + " result = " + int result = (( int )(this.getCreateDate().getTime() - ((ChatHistoryItem)t).getCreateDate().getTime | |
Bulk Delete and Update - best practice? public static class CacheData { @GeneratedValue @Id long id; @Index int hash; String data; public long getId() { return id; } public int getHash() { return hash; } public void setHash( int value) { hash | |
how to persist an object twice into two diff. collections of two diff. classes selectedSquads = new ArrayList (); if (tableSquads.getSelectedRows().length 0) { int [] rows ... (Competition.class, actualCompetition.getId()); for ( int i : rows) { int modelRow = tableSquads | |
Recursive calls with @PreUpdate annotation and Glassfish OutOfMemoryError.invoke(Object, Object...) line: 597 ECI.invoke(Object) line: 95 EDS.i( int , Object) line: 241 PMImpl(EMImpl).fire( int , Object, UTY) line: 1083 PMImpl(EMImpl).bd(Object, UTY) line: 1036 PMImpl.bd(Object, UTY) line: 2572 ENT.Z() line: 1177 ENT.Y(UMR, boolean) line: 1041 ENT.beforeModifyMember( int | |
Unexpected exception (error 990) entrada = new Scanner(System.in); protected int id; protected String matricula; protected String fmat; @Embedded private Persona piloto; public Integer getId() { return id; } public void setId( int id ... \\VehiculoPersona.odb"); EntityManager em; em = emf.createEntityManager(); for ( int i = 0; i | |
Is there a function of "drop table" or "delete from table"?"); sequence.allocate(( int )-sequence.currentValue()); Assuming you use JPA ... bit int value since the allocate methods receives an int value. "$auto" is the name of the automatic | |
Null enums and IS (NOT) NULL: NullPointerException.SEQUENCE, generator = "asd") private int id; @Enumerated(EnumType.STRING) private ExampleEnum exampleEnum; public int getId() { return id; } public void setId( int id) { this.id = id; } public ExampleEnum | |
Unable to persist fields in subclass extends SimpleAbstractPersonTest { /** * */ @Id @GeneratedValue private long id; private int ... = new SimpleObjectProperty (); //eg: (1959, Month.DECEMBER, 12); public SimplePatientTest( int mrn ... .PROPERTY) public int getMedicalRecordNumber() { return medicalRecordNumber; } @Access(AccessType | |
How to avoid NULL values on Embedded entities int numero; @Basic(optional=false) private String ciudad;   ... String pais; @Basic(optional=false) private int cp; } And how to make | |
Performance and memory usage of queries.Persistence; import javax.persistence.Query; public class MemoryUsageOfQuerys { static int steps = 500000 ... ; .createEntityManagerFactory("objectdb:$objectdb/db/test.tmp;drop"); EntityManager em; for ( int i = 0; i | |
What algorithm in find() I test the time cost for find(), obtain a linear complexity with the following codes: int iBlock = 0x10000; for ( int i = 1; i | |
Problem with @UniqueConstraint [] args) { int r = ( int )( Math . random () * 1000000 ); String PATH = "c:\\temp\\test_" + r + ".odb | |
Does ObjectDB support lazy loading?; } @Entity static class B { @Id @GeneratedValue public Long id; int value; B( int value | |
NoSuchFieldError: __odbTracker on NetBeans 7.3 + JBoss 7.1.1; } @Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return | |
NPE at com.objectdb.jpa.JpaQuery.getResultList(true, -1, -1); } public List findMomentPayloadEntities( int maxResults, int firstResult) { return ... (boolean all, int maxResults, int firstResult) { EntityManager em = getEntityManager(); try ... ; int maxResults, int firstResult) {   | |
Inverse OneToMany Mapping and EmbeddedId ( strategy = IDENTITY ) public int id ;   ... ; public int id ; @OneToMany ... ; public int id ; @ManyToOne ( )   | |
[ObjectDB 2.2.5_02] Unexpected exception (Error 990) com.objectdb.o.InternalException: java.lang.NullPointerException: null() { return findChartEntities(true, -1, -1); } public List findChartEntities( int maxResults, int ... findChartEntities(boolean all, int maxResults, int firstResult) { EntityManager em = getEntityManager(); try | |
javax.servlet.ServletException: Annotated methods must follow the JavaBeans naming convention. __odbHidden_getPropertyName Where getWidthPxSideBarLeft() is an annotated getter of an entity ViewConfiguration: private int ... ; public int getWidthPxSideBarLeft() { return widthPxSideBarLeft; } public void setWidthPxSideBarLeft( int widthPxSideBarLeft | |
ObjectDB can't be activated; } private static void print(Enumeration e, int indent) throws ... static String indent( int indent) { String str = ""; for ( int i = 0; i | |
Tracking changes to new collections (in enhancement mode) after flush; public int getCount() { return ... ModelElementImpl { private static int uidCounter = 1; @Id private String uid = "" + uidCounter++; public ... (Object obj) { return uid.equals(((ModelElementImpl)obj).getUid()); } @Override public int hashCode | |
ArrayIndexOutOfBoundsException with enhanced Entity() then we get an ArrayIndexOutOfBoundsException within here: MMM.J( int ) line: 602 ENT.beforeModifyEmbedded( int ) line: 1007 EMT.beforeModifyMember( int ) line: 90 TestEntity.__odbSet_myEmbed(TestEntity, TestEmbed) line: 1 (out of synch) TestEntity | |
Merge throw exception "Attempt to reuse an existing primary key value"; final int Id = 0; em.getTransaction().begin();   ... ; @Id private int Id; public MyEntity( int id) {   | |
NullPointerException in __odbGetNumMember wrong: Mitglied(GalaxyJPAEntityQublet).__odbGetNumMember( int ) line: 1 UMR.I(Object) line: 765 UMR.H ... ENH.a(ENT, TYW) line: 46 STA.T(EVC, TYW) line: 512 STM.E(EVC, TYW, boolean, int ) line: 425 PMImpl(OBM |