ObjectDB ObjectDB

Internal Website Search

191-200 of 200 resultsRefresh

java.sql.Time field off by 30 minutes

{         @Id @GeneratedValue(strategy = GenerationType.AUTO)         private long id;         String ... {" + "id=" + id + ", myname=" + myname +                 ", mytime=" + mytime + ", mytimestamp ... : MyEntity{id=1, myname=Roger, mytime=21:33:15, mytimestamp=2012-03-07 21:33:15.291} MyEntity{id=1

TemporalType injection with Calendar using JPA

implements Serializable { private TimePeriod id; private List<Point> points; public ... getId() { return id; } public void setId(TimePeriod id) { this.id = id ... ,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/London

Is it possible to remove parent/child entities without refresh?

.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence ... ; public class ObjectDbRemoveTest { @Entity public static class ParentEntity {   @Id   @GeneratedValue   private long id;   @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy

Merge with Parent/Child entities not possible

javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToOne ... public static class ParentEntity {   @Id   @GeneratedValue   private long id;   @OneToMany(fetch ... );   }   public long getId() {    return id;   }   public void setId(long id) {    this.id

EntityManager JPA or JDO impl and different behavior

. However if I use em.find(SomeObject.class, id) the map is NOT populated. I created a simple test ... would too, but may have been wrong. That still doesn't change the fact that in my project the em.find(type, id ... it populates the map in both. Because my project uses Spring to create the entity manager: <bean id

failure to enforce NOT NULL for java.lang.String

: @Entity public class Request { public Request() { } @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; @Unique @Persistent(nullValue=NullValue.EXCEPTION) private String username; public Long getId() { return id; } public void setId(Long id) { this.id

Efficient query on EmbeddedId

understand that making a query just on entity.id.field1 is efficient. Of course, making a query ... is: what about making a query just on entity.id.field2? I suppose it will not be an efficient query, because all database entries have to be checked. My assumption is based on the fact that entity.id

Object as parameter results in exception

owningCompany; } @Entity() public class Company{    .    .    .     @Id    private Long id ... .info("Fetching type: {} with id {} with company: {}", new Object[]{managedClass, primaryKey, company ... .get("id"), primaryKey),     qb.and(qb.equal(p.get("owningCompany"), company)));   TypedQuery<T> q

remove & persist in same transaction => Attempt to reuse an existing primary key value

, <id>) much faster than an equivalent query. To optimize the Performance we define a special Entity (A) with additional data that use an existing ID of another Entity (B) from another class ... ) we check if an Entity (A) with the ID of Entity (B) exist. If it exist we put the date

Listing large number of complicated objects with paging.

with such a simple query: select prod from Product prod order by prod.id ASC Right now I have 55541 ... .createQuery("select prod from Product prod order by prod.id ASC", Product.class); prodList = icQuery ... Product prod order by prod.id ASC] 2011-11-15 19:30:59.578 [http-bio-8080-exec-3] DEBUG pl.hplxtool.dao

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