Home » Search

About IDE

181-190 of 200Refresh
Forum
2

java.sql.Time field off by 30 minutes

());     }     @Entity     public static class MyEntity {         @Id @GeneratedValue(strategy = GenerationType.AUTO)         private long id;         String myname = "Roger";         java.sql.Time mytime ...         public String toString() {             return "MyEntity{" + "id=" + id + ", myname=" + myname
Forum
2

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
Forum
2

Update Entity references if we change the type of an entity

how we detect the existing EntityB instances they must be converted to the new Entity. With the same ID, because it's possible that many other entities have just a ID based reference with a simple 'int' field to this element. And we thought that also the real references are based on the ID. This step
Forum
2

TemporalType injection with Calendar using JPA

Chart implements Serializable { private TimePeriod id; private List points ... TimePeriod getId() { return id; }   public void setId(TimePeriod id) { this.id = id; }   @OneToMany(cascade=javax.persistence.CascadeType.ALL,fetch=javax
Forum
2

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
Forum
2

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
Forum
2

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
Forum
2

remove() and 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 ... (B) we check if an Entity (A) with the ID of Entity (B) exist. If it exist we put the date
Forum
2

Object as parameter results in exception

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

Blocked by find

I have a container object which wraps an objectdb database. There is a "putIfAbsent(String id, Object obj)" method which is synchronized and attempts to load an object by id using the EntityManager ... but the entity object is simple and looks like: @Entity public class DataHolder { @Id private