@Test
@Sudo
public void testDescriber() {

	OSchema schema = tester.getMetadata().getSchema();
	try {
		DAO.describe(OSchemaHelper.bind(tester.getDatabase()), IDAOTestClassA.class);
		assertTrue(schema.existsClass("DAOTestClassRoot"));
		assertTrue(schema.existsClass("DAOTestClassA"));
		assertTrue(schema.existsClass("DAOTestClassB"));
		OClass daoTestClassRoot = schema.getClass("DAOTestClassRoot");
		OClass daoTestClassA = schema.getClass("DAOTestClassA");
		OClass daoTestClassB = schema.getClass("DAOTestClassB");
		
		assertTrue(daoTestClassRoot.isAbstract());
		assertProperty(daoTestClassRoot, "root", OType.STRING);
		
		OProperty root = assertProperty(daoTestClassA, "root", OType.STRING);
		assertEquals("DAOTestClassRoot.root", root.getFullName());
		
		assertProperty(daoTestClassA, "name", OType.STRING);
		assertProperty(daoTestClassA, "bSingle", OType.LINK, daoTestClassB, null);
		assertProperty(daoTestClassA, "bOtherField", OType.LINK, daoTestClassB, null);
		assertProperty(daoTestClassA, "selfType", OType.LINK, daoTestClassA, null);
		assertProperty(daoTestClassA, "linkAsDoc", OType.LINK, daoTestClassB, null);
		assertProperty(daoTestClassA, "embeddedStringList", OType.EMBEDDEDLIST, OType.STRING);
		assertProperty(daoTestClassA, "linkList", OType.LINKLIST, daoTestClassB, null);
		
		assertProperty(daoTestClassB, "alias", OType.STRING);
		assertProperty(daoTestClassB, "linkToA", OType.LINK, daoTestClassA, null);
	} finally {
		if(schema.existsClass("DAOTestClassA")) schema.dropClass("DAOTestClassA");
		if(schema.existsClass("DAOTestClassB")) schema.dropClass("DAOTestClassB");
		if(schema.existsClass("DAOTestClassRoot")) schema.dropClass("DAOTestClassRoot");
	}
}