eclipselink « Default « JPA Q&A

1. How do I write JPA QL statements that hints to the runtime to use the DEFAULT value?

I have a table like so:

mysql> show create table foo;
    network bigint NOT NULL,
    activeDate datetime NULL default '0000-00-00 00:00:00',

2. EclipseLink: don't fetch some fields by default

Let's say we have an entity

public class Person {
    @Id int id;
    @Basic String name;
    @Basic String remark;
Let's say "remark" field is ...

3. Is it possible to set persistence unit default catalog at runtime

For the moment I use the table annotation containing the catalog

@Table(catalog = "Mycatalog", schema = "MySchema", name = "MyTable")
But the catalog name should be made configurable. The persistence.xml file can not be ...