Fast Object Database for Java - with JPA/JDO support

Internal Website Search

21-30 of 200 resultsRefresh
21

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
21

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 ... , please explain how exactly you create, persist and retrieve the objects. Except the id field
21

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 Masaaki Tsugami You cannot set the next id
21

Immediately retrieve unique id

; @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sampleSeqGenerator") @Id long id; The id ... to be: SPL1, SPL2, SPL3 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
21

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 ... of field property com.greensoft.objectdb.test.entity.Element.id using reflection (error 613) at com ... .test.entity.Element.id using reflection at com.objectdb.o._PersistenceException.b
21

Uninitialized primary key (id = 0)

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

World database - Changing country ID

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
21

@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
21

Newbie : How to return the auto-generated ID

ID when I persist a new entity (with @Id @GeneratedValue annotations applied). I am following ... The id is available in the id field so you can simply access it. By default, however, the allocated value is available only after commit or flush and not after persist. If you need to have the id
21

Create simple index for a Id field

DataItemProvider {         @Id     private Key key = null;     private Value value = null; and I ... ,Value> implements DataItemProvider {        @Id     @Index     private Key key = null ... haven't found ouy why. Thanks in advance. Greatings ksii13 E As far as I know, the @Id is indexed

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support