mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#282 - API: Add Model.Find as alternative to Model.Finder ... which uses reflection to determine entity bean type literal
This commit is contained in:
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
@Entity
|
||||
public class InfoCompany extends Model {
|
||||
|
||||
public static Finder<Long,InfoCompany> find = new Finder<Long,InfoCompany>(Long.class, InfoCompany.class);
|
||||
public static Finder<Long,InfoCompany> find = new Finder<Long,InfoCompany>(InfoCompany.class);
|
||||
|
||||
@Id
|
||||
Long id;
|
||||
|
||||
@@ -7,7 +7,7 @@ import javax.persistence.*;
|
||||
@Entity
|
||||
public class InfoCustomer extends Model {
|
||||
|
||||
public static Finder<Long,InfoCustomer> find = new Finder<Long,InfoCustomer>(Long.class, InfoCustomer.class);
|
||||
public static Finder<Long,InfoCustomer> find = new Finder<Long,InfoCustomer>(InfoCustomer.class);
|
||||
|
||||
@Id
|
||||
Long id;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.avaje.tests.model.onetoone;
|
||||
|
||||
import com.avaje.tests.model.BaseModel;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import com.avaje.tests.model.BaseModel;
|
||||
|
||||
@Entity
|
||||
@Table(name="oto_account")
|
||||
public class Account extends BaseModel {
|
||||
|
||||
public static final Finder<Long,Account> find = new Finder<Long,Account>(Long.class, Account.class);
|
||||
public static final Find<Long,Account> find = new Find<Long,Account>(){};
|
||||
|
||||
String name;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.avaje.tests.model.BaseModel;
|
||||
@Table(name="oto_user")
|
||||
public class User extends BaseModel {
|
||||
|
||||
public static final Finder<Long,User> find = new Finder<Long,User>(Long.class, User.class);
|
||||
public static final Find<Long,User> find = new Find<Long,User>(){};
|
||||
|
||||
String name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user