I have a Course entity which contains a Set of Keys to my Tag entity. How would I go about creating a query to get a list of courses with a specific tag? For example, I want to find all the courses tagged with java.
Here are my entities:
@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true")
public class Course{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent private Set<Key> tags;
//etc
}
@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true")
public class Tag{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent private String tagText;
}