ObjectDB Database Search

101-150 of 200 results

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 ... ID , others a String UUID. Our Base-Entity everything inherits from is declared as usual with Long: @ Id @GeneratedId private Long myId; This has always been working, however, suddenly partial Objects in

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

for field uk.co.his.experiment8.cmdline.objdb.CompoundKeyMapItem.container (javax.persistence. Id ... .container (javax.persistence. Id , javax.persistence.ManyToOne) at com.objectdb.o.MSG.d(MSG.java:61 ... .persistence.FlushModeType; import javax.persistence. Id ; import javax.persistence.NamedQueries; import

Wrong @Id type

Hi,  I have noticed some values of id column suddenly switched to int ... / To repair IDs that have already changed their types you will have to 'touch' the objects and store them again, or use an ObjectDB version before the fix, with an UPDATE queries that change the IDs

EntityManager.find(entityClass, primaryKey) is slow when accessing non-existent IDs

* * EntityManager.find(entityClass, primaryKey) is slow when accessing * non-existent IDs . * * Select queries process non-existent IDs fastest. * */ public class OdbEmFindById { public static final int EVALUATION_LIMIT = 1000000; @Entity public static class X { @EmbeddedId public XId id ; public X() { } public X

Populating entity id before transaction commit

Hi, I have a question about populating auto generated id before transaction commit. We are using ... transaction is committed so all returned entities are not populated with ID in this context. How can I force ODB to populate entity ID before transaction is committed? Or maybe there is another way

Change Sequcene Id

could I change sequcence id ? allocating small value may not be effect. or something other ways ... MyEntity is defined with JPA @Entity public class MyEntity {     @ Id     @GeneratedValue(strategy=GenerationType.IDENTITY)     private Long id ; }   Tsu

multi thread application, id field sporadically null

with the field that is declared as @ Id having the value null (what is not correct, we checked ... Serializable { private static final long serialVersionUID = 1L; @ Id public String nodePath; ... as soon as ... how exactly you create, persist and retrieve the objects. Except the id field, are other fields

Immediately retrieve unique id

= GenerationType.SEQUENCE, generator = "sampleSeqGenerator") @ Id long id ;   The id field is as expected ... etc. that makes use of the id . How do I capture that id without roundtripping? I see pre and post commit, but pre the id isn't generated yet, and post I would have to somehow resave. mbcladwell

Uninitialized primary key (id = 0)

is id =0. What situation will be id =0? TIA gzdillon Lai Yang This happens if you define an id field ... ; @GeneratedValue should solve the problem, unless you already have entity objects with IDs 0 ... table - you can set an initial ID which is larger than any existing ID to avoid any conflict. support Support

World database - Changing country ID

Sample world DB in ObjectDB Explorer - and couldn't find my country, as it has invalid id ( ez instead of cz ). I changed the id of country to "cz". But when I try to find the country: SELECT c FROM Country c WHERE id = "cz" no results are returned. If i find it by name, I can see ID has changed to cz

Create simple index for a Id field

{         @ Id     private Key key = null;     ... public class ObjectDbEntity implements DataItemProvider {        @ Id   ... why. Thanks in advance. Greatings ksii13 E As far as I know, the @ Id is indexed by default

@SequenceGenerator and single id in whole database

of my model enitities, but it looks like id's are generated using only one, shared generator. Is there any ... values), and attaching these generators to @ Id fields in different classes. Make sure you set ... (name = "XXX", sequenceName = "Seq_XXX", initialValue = 1000) @GeneratedValue(generator = "XXX") @ Id

Newbie : How to return the auto-generated ID

ID when I persist a new entity (with @ Id @GeneratedValue annotations applied). I am following ... Deepak Mishra The id is available in the id field so you can simply access it. By default ... to have the id available earlier (immediately after persist ) - you have to switch to sequence or table  value generation strategy. support Support

Multiple @ID

I have an entity with 2 @ ID @Entity public class TheTable extends AbstractMMODataObject { @ Id String userId; @ Id long range; It was a mistake, I really should have just made  range an @Index but it already has millions of records in it. I am wondering if I query select t from  TheTable t where range

Explorer shows Long id, but should be Integer

Hi! I have seen a strange behavior of ObjectDB Explorer: it shows @ Id as being Long, not Integer ... used for one project. If I open one of the entities in the explorer, then I click on it's id (in the sample on parts of the Embedded id ) as if I would want to edit, then I press enter and ObjectDB

Possible issue for default id generator

First all, congratulations to Objectdb team for the excellent work. Possible issue for default id generator when strategy is sequence. Error: Incomplete definition of auto value in field MyTestCase ... and 36: @GeneratedValue(strategy=GenerationType.SEQUENCE)//, generator="seq") @ Id @SequenceGenerator

jakarta.persistence.AttributeOverride

(whether explicit or default) property or field or Id property or field. May be applied to an entity that extends a mapped superclass or to an embedded field or property to override a basic mapping or id mapping ... the same as in the original mapping. Example 1: @MappedSuperclass public class Employee { @ Id protected

When using inheritance, you can specify, which ID to use

When storing objects with inheritance, it should be possible to choose, which ID (parent or child class) should be used for new object. For example: public EntityA() {     @ Id     long id ;     String field1; }   public EntityB

ObjectDB-2.6.9: Failed to commit transaction: Failed to set numeric value of field property Element.id using reflection

to set numeric value of field property com.greensoft.objectdb.test.entity.Element. id using reflection ... value of field property com.greensoft.objectdb.test.entity.Element. id using reflection (error 613 ... .test.entity.Element. id using reflection at com.objectdb.o._PersistenceException.b

Logical "or" works not correcly when field is @Id and first position

only, if the field for the "or" is the first one defined as @ Id . public class OrTest {      ... ;       }         @ Id ... ; @ Id         String b;       

strange object unique ID

at a customer the unique object id of one class changed dramatically from a nurmal number ... the first report of such an issue. Theoretically, this may be caused by a loop that allocates IDs ... , which seems to be functional, except that the automatic ID generator that is used for some

jakarta.persistence.PersistenceUnitUtil

entity ) Return the id of the entity. A generated id is not guaranteed to be available until after the database insert has occurred. Returns null if the entity does not yet have an id . Parameters: entity - entity instance Returns: id of the entity. Throws: IllegalArgumentException - if the object

Page #9 entry 0 (key 'bjjl') has 75 extra bytes / Unexpected last index ID: -119 (expected -116)

Please check the attached database file. When running the Doctor, I get   Global Value Errors ------------------- [1] Unexpected last index ID : -119 (expected -116) Page Content Errors ------------------- [1] Page #9 entry 0 has unexpected object format [2] Page #9 entry 0 (key 'bjjl') has 75

jakarta.persistence.NamedEntityGraphs

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.NamedEntityGraphs Implemented Interfaces: Annotation Target: Type Used to group NamedEntityGraph annotations. See Also: NamedEntityGraph Since: Jakarta Persistence (JPA) 2.1 Public Static Fields No JavaDoc Info for jakarta.persistence

jakarta.persistence.Converts

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.Converts Implemented Interfaces: Annotation Target: Method, Field, Type Used to group Convert annotations. Multiple converters must not be applied to the same basic attribute. See Also: Convert Since: Jakarta Persistence (JPA) 2.1

jakarta.persistence.EntityManagerFactory

Jakarta Persistence (JPA) Interface jakarta.persistence.EntityManagerFactory Super Interfaces: AutoCloseable Interface used to interact with the persistence unit, and to create new instances of EntityManager . A persistence unit defines the set of all classes that are related or grouped by

jakarta.persistence.SequenceGenerators

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.SequenceGenerators Implemented Interfaces: Annotation Target: Type, Method, Field, Package Used to group SequenceGenerator annotations. See Also: SequenceGenerator Since: Jakarta Persistence (JPA) 2.2 Public Static Fields No JavaDoc

jakarta.persistence.TableGenerators

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.TableGenerators Implemented Interfaces: Annotation Target: Type, Method, Field, Package Used to group TableGenerator annotations. See Also: TableGenerator Since: Jakarta Persistence (JPA) 2.2 Public Static Fields No JavaDoc Info

jakarta.persistence.ManyToOne

= false) @JoinColumn(name = "CUST_ ID ", nullable = false, updatable = false) public Customer getCustomer() { return customer; } Example 2: @Entity public class Employee { @ Id int id ; @Embedded JobInfo ... pm; // Bidirectional } @Entity public class ProgramManager { @ Id int id ; @OneToMany(mappedBy

jakarta.persistence.Convert

would otherwise apply. The Convert annotation should not be used to specify conversion of id attributes, of version ... Employee { @ Id long id ; @Convert(converter = BooleanToIntegerConverter.class) boolean fullTime ... EmployeeDateConverter implements AttributeConverter { ... } @Entity public class Employee { @ Id long

jakarta.persistence.ColumnResult

.createNativeQuery( "SELECT o. id AS order_ id , " + "o.quantity AS order_quantity, " + "o.item AS ... ) AND (order_item = i. id )", "OrderResults"); @SqlResultSetMapping( name = "OrderResults", entities = { @EntityResult( entityClass = com.acme.Order.class, fields = { @FieldResult(name = " id ", column = "order_ id

jakarta.persistence.FieldResult

.createNativeQuery( "SELECT o. id AS order_ id , " + "o.quantity AS order_quantity, " + "o.item AS order_item, " + "FROM Order o, Item i " + "WHERE (order_quantity 25) AND (order_item = i. id )", "OrderResults ... .Order.class, fields = { @FieldResult(name = " id ", column = "order_ id "), @FieldResult(name = "quantity

jakarta.persistence.metamodel.SingularAttribute

() Is the attribute an id attribute? This method returns true if the attribute is a simple id , an embedded id , or an attribute of an id class . Returns: boolean indicating whether the attribute is an id

jakarta.persistence.AssociationOverride

@AssociationOverride(name = "address", joinColumns = @JoinColumn(name = "ADDR_ ID ")) // address field mapping overridden to ADDR_ ID foreign key public class PartTimeEmployee extends Employee ... Employee { @ Id int id ; @AssociationOverride( name = "phoneNumbers", joinTable = @JoinTable(name

jakarta.persistence.AssociationOverrides

properties or fields. Example: @MappedSuperclass public class Employee { @ Id protected Integer id ... locker; public Integer getId() { ... } public void setId(Integer id ) { ... } public Address ... ( name = "address", joinColumns = @JoinColumn("ADDR_ ID ")), @AttributeOverride( name = "locker

jakarta.persistence.SqlResultSetMapping

query or stored procedure. Example: Query q = em.createNativeQuery( "SELECT o. id AS order_ id , " + "o ... , Item i " + "WHERE (order_quantity 25) AND (order_item = i. id )", "OrderResults ... = { @FieldResult(name = " id ", column = "order_ id "), @FieldResult(name = "quantity", column = "order

jakarta.persistence.IdClass

of the entity must be annotated Id , and the specified primary key type must have fields or ... to be annotated. Example: @IdClass(EmployeePK.class) @Entity public class Employee { @ Id String empName; @ Id ... , which must declare fields or properties with names and types that match the Id fields and properties

jakarta.persistence.JoinTable

) using an underscore. Example: @JoinTable( name = "CUST_PHONE", joinColumns = @JoinColumn(name = "CUST_ ID ", referencedColumnName = " ID "), inverseJoinColumns = @JoinColumn(name = "PHONE_ ID ", referencedColumnName = " ID ")) This annotation may not be applied to a persistent field or property not annotated

jakarta.persistence.ManyToMany

: @ManyToMany @JoinTable(name = "CUST_PHONE", joinColumns = @JoinColumn(name = "CUST_ ID ", referencedColumnName = " ID "), inverseJoinColumns = @JoinColumn(name = "PHONE_ ID ", referencedColumnName = " ID

jakarta.persistence.MapKey

public class Employee { ... @ Id Integer getEmpId() { ... } @ManyToOne @JoinColumn(name = "dept_ id ... () {... } ... } @Entity public class Employee { @ Id public Integer getEmpId() { ... } ... @ManyToOne @JoinColumn(name = "dept_ id ") public Department getDepartment() { ... } ... } Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.MappedSuperclass

. Example: Concrete class as a mapped superclass @MappedSuperclass public class Employee { @ Id ... ") protected Address address; public Integer getEmpId() { ... } public void setEmpId(Integer id ... = "ADDR_ ID ")) public class PartTimeEmployee extends Employee { // Inherited empId field mapped to PT

jakarta.persistence.MapsId

{ @ Id long empId; String name; ... } And then the dependent entity uses EmbeddedId to declare ... to primary key type of Employee } @Entity public class Dependent { @EmbeddedId DependentId id ; ... @MapsId("empid") // maps the empid attribute of embedded id @ManyToOne Employee emp; } If a ManyToOne

jakarta.persistence.EmbeddedId

of the entity may be annotated Id or EmbeddedId , and the entity class must not declare an IdClass ... those attributes of the embedded id that do not correspond to the relationship to the parent entity ... = "dep_name")) @EmbeddedId DependentId id ; ... @MapsId("empPK") @ManyToOne Employee emp

jakarta.persistence.EntityResult

. Example: Query q = em.createNativeQuery( "SELECT o. id , o.quantity, o.item, " + "i. id , i.name, i.description " + "FROM Order o, Item i " + "WHERE (o.quantity 25) AND (o.item = i. id )", "OrderItemResults

jakarta.persistence.OneToMany

Set getOrders() { return orders; } // In Order class: @ManyToOne @JoinColumn(name = "CUST_ ID ... : @ManyToOne @JoinColumn(name = "CUST_ ID ", nullable = false) public Customer getCustomer() { return customer ... : @OneToMany(orphanRemoval = true) @JoinColumn(name = "CUST_ ID ") // join column is in table

jakarta.persistence.criteria.AbstractQuery.getGroupRestriction()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.AbstractQuery Predicate getGroupRestriction() Return the predicate that corresponds to the restriction(s) over the grouping items, or null if no restrictions have been specified. Returns: having clause predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.AbstractQuery.having(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.AbstractQuery AbstractQuery having (    Expression restriction ) Specify a restriction over the groups of the query. Replaces the previous having restriction(s), if any. Parameters: restriction - a simple or compound

jakarta.persistence.criteria.AbstractQuery.having(Predicate...)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.AbstractQuery AbstractQuery having (    Predicate... restrictions ) Specify restrictions over the groups of the query according the conjunction of the specified restriction predicates. Replaces the previously having added

jakarta.persistence.criteria.AbstractQuery.having(List)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.AbstractQuery AbstractQuery having (    List restrictions ) Specify restrictions over the groups of the query according the conjunction of the specified restriction predicates. Replaces the previously added having

jakarta.persistence.criteria.Subquery.having(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.Subquery Subquery having (    Expression restriction ) Specify a restriction over the groups of the subquery. Replaces the previous having restriction(s), if any. This method only overrides the return type