mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-23 07:51:04 +00:00
#2477 - Add failing test case (disable for the moment)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package org.tests.model.embedded;
|
||||
|
||||
import io.ebean.annotation.DbArray;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
public class EmbArrayMaster {
|
||||
|
||||
@Embeddable
|
||||
public static class EmbArrayDetail {
|
||||
@DbArray
|
||||
List<String> vals;
|
||||
|
||||
public EmbArrayDetail(List<String> vals) {
|
||||
this.vals = vals;
|
||||
}
|
||||
}
|
||||
|
||||
@Id
|
||||
int id;
|
||||
|
||||
@ElementCollection
|
||||
@CollectionTable(name = "test_array_detail", joinColumns = {@JoinColumn(name = "master_id")})
|
||||
List<EmbArrayDetail> details;
|
||||
|
||||
public EmbArrayMaster(List<EmbArrayDetail> details) {
|
||||
this.details = details;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.tests.model.embedded;
|
||||
|
||||
import io.ebean.DB;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
import static java.util.Collections.singletonList;
|
||||
|
||||
class TestEmbeddedDbArray {
|
||||
|
||||
/**
|
||||
* Failing test case for #2477
|
||||
*/
|
||||
@Disabled
|
||||
@Test
|
||||
void testArrayInsert() {
|
||||
EmbArrayMaster t = new EmbArrayMaster(singletonList(new EmbArrayMaster.EmbArrayDetail(emptyList())));
|
||||
DB.insert(t);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user