Internal Website Search
101-150 of 200 resultsWrong @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 | |
javax.persistence.PrimaryKeyJoinColumns JPA Annotation PrimaryKeyJoinColumns Target: TYPE, METHOD, FIELD Implemented Interfaces: Annotation Groups PrimaryKeyJoinColumn annotations. It is used to map composite foreign keys. Example ... ({ @PrimaryKeyJoinColumn(name="CUST_ ID ", referencedColumnName=" ID "), @PrimaryKeyJoinColumn(name="CUST | |
javax.persistence.JoinColumns JPA Annotation JoinColumns Target: METHOD, FIELD Implemented Interfaces: Annotation Specifies the mapping for composite foreign keys. This annotation groups JoinColumn annotations for the same ... ({ @JoinColumn(name="ADDR_ ID ", referencedColumnName=" ID "), @JoinColumn(name="ADDR_ZIP", referencedColumnName | |
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;   | |
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 | |
javax.persistence.metamodel.MappedSuperclassType) Return the attribute that corresponds to the id attribute declared by the entity or mapped superclass. Parameters: type - the type of the represented declared id attribute Return: declared id attribute Throws: IllegalArgumentException - if id attribute of the given type is not declared in | |
javax.persistence.metamodel.IdentifiableType SingularAttribute getDeclaredId (Class type) Return the attribute that corresponds to the id ... declared id attribute Return: declared id attribute Throws: IllegalArgumentException - if id attribute of the given type is not declared in the identifiable type or if the identifiable type has an id | |
javax.persistence.metamodel.EntityType that corresponds to the id attribute declared by the entity or mapped superclass. Parameters: type - the type of the represented declared id attribute Return: declared id attribute Throws: IllegalArgumentException - if id attribute of the given type is not declared in the identifiable type or | |
AbstractQuery | |
javax.persistence.TableGenerator", table=" ID _GEN", pkColumnName="GEN_KEY", valueColumnName="GEN_VALUE", pkColumnValue="EMP_ ID ", allocationSize=1) @ Id @GeneratedValue(strategy=TABLE, generator="empGen") int id ; ... } Example 2: @Entity public class Address { ... @TableGenerator( name="addressGen", table=" ID _GEN", pkColumnName="GEN | |
Unexpected exception (Error 990) on find -------------------------- Group #1: Page#70606 3:'Elementarprodukt:400000100317025:7:1:' 1/2 1980+609/2589 Group #2: Page#138243 3:'Elementarprodukt:400000100417179:5:1:' 1/2 1980+396/2376 Group #3: Page#165140 3:'Elementarprodukt:400000100422048:13:1:' 1/2 1980+519/2499 Group #4: Page#74733 3:'Elementarprodukt | |
javax.persistence.OneToOne( name="CUSTREC_ ID ", unique=true, nullable=false, updatable=false) public CustomerRecord ... : @Entity public class Employee { @ Id Integer id ; @OneToOne @MapsId EmployeeInfo info; ... } // On EmployeeInfo class: @Entity public class EmployeeInfo { @ Id Integer id ; ... } Example 3 | |
javax.persistence.GeneratedValue conjunction with the Id annotation. The use of the GeneratedValue annotation is only required ... primary keys. Example 1: @ Id @GeneratedValue(strategy=SEQUENCE, generator="CUST_SEQ") @Column(name="CUST_ ID ") public Long getId() { return id ; } Example 2: @ Id @GeneratedValue(strategy=TABLE, generator | |
javax.persistence.MapKeyJoinColumns JPA Annotation MapKeyJoinColumns Target: METHOD, FIELD Implemented Interfaces: Annotation Supports composite map keys that reference entities. The MapKeyJoinColumns annotation groups ... and the referencedColumnName elements must be specified in each of the grouped MapKeyJoinColumn annotations | |
javax.jdo.FetchGroup JDO Interface FetchGroup FetchGroup represents a named fetch group for a specific class or interface. A fetch group instance identifies the name of the class or interface, the list of members (fields or properties) to be fetched when the fetch group is active, and the recursion depth for each | |
javax.jdo.Query, import statements, ordering and grouping specifications, result and result class, the range ... specification, and grouping specification. The association with a PersistenceManager, the candidate ... . Since: JDO 1.0 void setGrouping (String group ) Set the grouping expressions, optionally including | |
javax.jdo.annotations.FetchGroup for the fetch group of a class. Corresponds to the xml element "fetch- group ". Since: JDO 2.1 Public Annotation Attributes String[] fetchGroups default {} Fetch groups to be nested (included) in this fetch group . Since: JDO 2.1 Persistent [] members default null Members (fields and properties | |
FetchPlan.getGroups() - JDO Method JDO Method in javax.jdo.FetchPlan Set getGroups () Return an immutable Set containing the names of all active fetch groups . The Set is a copy of the currently active groups and will not change based on subsequent changes to the groups . Return: an immutable Set containing the names of all currently active fetch groups Since: JDO 2.0 | |
javax.jdo.FetchGroup.DEFAULT. This category includes members defined in the default fetch group in xml or annotations. Redefining the default fetch group via the API does not affect the members defined by this category. Using this category also sets the fetch-depth for the members in the default fetch group . Since: JDO 2.2 | |
javax.jdo.annotations.FetchGroups JDO Annotation FetchGroups Target: ElementType.TYPE Implemented Interfaces: Annotation Annotation for a group of fetch- group objects Since: JDO 2.1 Public Annotation Attributes FetchGroup[] value default null The Fetch Groups Since: JDO 2.1 | |
FetchPlan.setGroup(fetchGroupName) - JDO Method JDO Method in javax.jdo.FetchPlan FetchPlan setGroup ( String fetchGroupName ) Set the active fetch groups to the single named fetch group . Parameters: fetchGroupName - the single fetch group Return: the FetchPlan Since: JDO 2.0 | |
javax.jdo.spi.PersistenceCapable (int id , String name, and Float salary) would have the method generated: void ... .storeIntField (0, oid. id ); fm.storeStringField (1, oid.name); fm.storeObjectField (2, oid.salary ... this PersistenceCapable instance to the Object Id instance. For classes using single field identity | |
javax.jdo.datastore.DataStoreCache the parameter instance from the second-level cache. Parameters: oid - the object id of the instance to evict ... . Parameters: oids - the object ids of the instance to evict. Since: JDO 2.0 void evictAll (Object... oids) Evict the parameter instances from the second-level cache. Parameters: oids - the object ids | |
FetchPlan.removeGroup(fetchGroupName) - JDO Method JDO Method in javax.jdo.FetchPlan FetchPlan removeGroup ( String fetchGroupName ) Remove the fetch group from the set active fetch groups . Return: the FetchPlan Since: JDO 2.0 | |
FetchPlan.addGroup(fetchGroupName) - JDO Method JDO Method in javax.jdo.FetchPlan FetchPlan addGroup ( String fetchGroupName ) Add the fetch group to the set of active fetch groups . Return: the FetchPlan Since: JDO 2.0 | |
FetchPlan.clearGroups() - JDO Method JDO Method in javax.jdo.FetchPlan FetchPlan clearGroups () Remove all active groups leaving no active fetch group . Return: the FetchPlan Since: JDO 2.0 | |
PersistenceManager.getFetchGroup(cls,name) - JDO Method scope of the PersistenceManager, and hides the corresponding fetch group in the PersistenceManagerFactory. Parameters: cls - the class or interface for the FetchGroup name - the name of the fetch group | |
javax.jdo.annotations.Persistent defaultFetchGroup default "" Whether this member is in the default fetch group . Since: JDO 2.1 String ... "" Name of the fetch- group to use when this member is loaded due to being referenced when not | |
PersistenceManager.retrieveAll(useFetchPlan,pcs) - JDO Method should be retrieved. The fields in the current fetch group must be retrieved, and the implementation might retrieve more fields than the current fetch group . If the useFetchPlan parameter is false | |
PersistenceManager.detachCopyAll(pcs) - JDO Method and DETACH_UNLOAD_FIELDS) and the active fetch groups determine the scope of fetching for the graph ... to other persistent instances must either be in the default-fetch- group , or in the current custom FetchPlan | |
PersistenceManagerFactory.getFetchGroups() - JDO Method JDO Method in javax.jdo.PersistenceManagerFactory Set getFetchGroups () Get a modifiable Set containing a mutable copy of all currently active (in scope) fetch groups . The methods addFetchGroups ... : a copy of all currently active fetch groups Throws: SecurityExceptionif the caller is not authorized for {@link JDOPermission} ("getMetadata") Since: JDO 2.2 | |
PersistenceManager.retrieveAll(pcs,useFetchPlan) - JDO Method values should be retrieved. The fields in the current fetch group must be retrieved, and the implementation might retrieve more fields than the current fetch group . If the useFetchPlan parameter is false | |
PersistenceManager.retrieveAll(pcs,useFetchPlan) - JDO Method should be retrieved. The fields in the current fetch group must be retrieved, and the implementation might retrieve more fields than the current fetch group . If the useFetchPlan parameter is false | |
javax.jdo.annotations.FetchGroup.fetchGroups JDO Annotation Attribute in javax.jdo.annotations.FetchGroup String[] fetchGroups default {} Fetch groups to be nested (included) in this fetch group . Since: JDO 2.1 | |
FetchPlan.setGroups(fetchGroupNames) - JDO Method JDO Method in javax.jdo.FetchPlan FetchPlan setGroups ( String... fetchGroupNames ) Set a collection of groups . Parameters: fetchGroupNames - a String array of names of fetch groups Return: the FetchPlan Since: JDO 2.0 | |
FetchPlan.setGroups(fetchGroupNames) - JDO Method JDO Method in javax.jdo.FetchPlan FetchPlan setGroups ( Collection fetchGroupNames ) Set a collection of groups . Parameters: fetchGroupNames - a collection of names of fetch groups Return: the FetchPlan Since: JDO 2.0 |