Created
January 12, 2014 01:28
-
-
Save qharlie/8379400 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getOppositeRelations(modelName: String, program: ProgramAST): List[String] = { | |
var ret: List[String] = List() | |
program.models map { | |
model => | |
model.members map { | |
member => | |
member.relationship match { | |
case RelationAST(None, None) => { | |
} | |
case RelationAST(Some(fetchType), Some(nToM)) => { | |
if (member.memberType == modelName) { | |
ret = ret :+ model.name | |
} | |
} | |
} | |
} | |
} | |
ret | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment