mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1181 - ENH: Add @FetchPreference support - Secondary query generation is based on order of fetch statements
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.tests.model.converstation;
|
||||
|
||||
import io.ebean.annotation.FetchPreference;
|
||||
import org.tests.model.BaseModel;
|
||||
|
||||
import javax.persistence.Column;
|
||||
@@ -21,9 +22,11 @@ public class Conversation extends BaseModel {
|
||||
@ManyToOne
|
||||
Group group;
|
||||
|
||||
@FetchPreference(1)
|
||||
@OneToMany(mappedBy = "conversation")
|
||||
List<Participation> participants;
|
||||
|
||||
@FetchPreference(2)
|
||||
@OneToMany(mappedBy = "conversation")
|
||||
List<Message> messages;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user