public void ensureContainedTablesExist(ConnectionWrapper cw) throws SQLException, SchemaPermissionException
	{

		// a list of contained classes that must be added
		ArrayList<Class<?>> containedClasses = new ArrayList<Class<?>>();
		if (this.clazz.isArray())
		{
			if (!ObjectTools.isDatabasePrimitive(clazz.getComponentType()))
			{
				// make sure the component type exists
				containedClasses.add(clazz.getComponentType());
			}
		}
		else
		{
			for (int x = 0; x < this.getPropertyCount(); x++)
			{
				if (this.isReferenceType(x))
				{
					Class<?> returnType = returnTypes.get(x);
					containedClasses.add(returnType);
				}
			}
		}
		for (Class<?> c : containedClasses)
		{
			adapter.getPersist().getTableManager().ensureTableExists(c, cw);
		}
	}