use of io.crnk.meta.model.MetaAttribute in project crnk-framework by crnk-project.
the class JpaMetaEndToEndTest method test.
@Test
public void test() {
MetaResource testMeta = resourceMetaProvider.getMeta(TestEntity.class);
Assert.assertNotNull(testMeta);
MetaAttribute embAttrMeta = testMeta.getAttribute(TestEntity.ATTR_embValue);
Assert.assertEquals(MetaJsonObject.class, embAttrMeta.getType().getClass());
}
use of io.crnk.meta.model.MetaAttribute in project crnk-framework by crnk-project.
the class JpaMetaEndToEndTest method testProjectedLobOnMappedSuperclass.
@Test
public void testProjectedLobOnMappedSuperclass() {
MetaResourceBase metaResource = resourceMetaProvider.getMeta(AnnotationMappedSubtypeEntity.class);
MetaAttribute lobAttr = metaResource.getAttribute("lobValue");
Assert.assertTrue(lobAttr.isLob());
}
use of io.crnk.meta.model.MetaAttribute in project crnk-framework by crnk-project.
the class JpaMetaEndToEndTest method testProjectedColumnAnnotatedValueIsNullable.
@Test
public void testProjectedColumnAnnotatedValueIsNullable() {
MetaResourceBase meta = resourceMetaProvider.getMeta(AnnotationTestEntity.class);
MetaAttribute field = meta.getAttribute("nullableValue");
Assert.assertTrue(field.isNullable());
}
use of io.crnk.meta.model.MetaAttribute in project crnk-framework by crnk-project.
the class JpaNullabilityMetaTest method testObjectValueNullable.
@Test
public void testObjectValueNullable() {
MetaEntity meta = metaProvider.discoverMeta(TestEntity.class);
MetaAttribute field = meta.getAttribute("stringValue");
Assert.assertTrue(field.isNullable());
}
use of io.crnk.meta.model.MetaAttribute in project crnk-framework by crnk-project.
the class JpaNullabilityMetaTest method testPrimaryKeyNotNullable.
@Test
public void testPrimaryKeyNotNullable() {
MetaEntity meta = metaProvider.discoverMeta(TestEntity.class);
MetaKey primaryKey = meta.getPrimaryKey();
MetaAttribute idField = primaryKey.getElements().get(0);
Assert.assertFalse(idField.isNullable());
}
Aggregations