String column = aliasedColumn.getText();
String alias = aliasNode.getText();
String newAlias = newAliasNode.getText();
ViewInfoImpl tableInfo = wiring.getInfoFromAlias(alias);
DboTableMeta tableMeta = tableInfo.getTableMeta();
DboColumnMeta columnMeta = facade.getFkMetaIfExist(tableMeta, column);
if(!(columnMeta instanceof DboColumnToOneMeta))
throw new IllegalArgumentException("Column="+column+" on table="+tableMeta.getColumnFamily()+" is NOT a OneToOne NOR ManyToOne relationship according to our meta data");
else if(!columnMeta.isIndexed())
throw new IllegalArgumentException("Column="+column+" on table="+tableMeta.getColumnFamily()+" is not indexed. Add @NoSqlIndex or map/reduce a new index in place and add annotation");
DboColumnToOneMeta toOne = (DboColumnToOneMeta) columnMeta;
DboTableMeta fkTableMeta = toOne.getFkToColumnFamily();
ViewInfoImpl existing = wiring.getInfoFromAlias(newAlias);
if(existing == null) {
existing = new ViewInfoImpl(newAlias, fkTableMeta);
wiring.putAliasTable(newAlias, existing);