Vulnerability in EPiServer.Forms
I´m having a custom entity, CustomClub, that derives from Club. I want to create a query that gets all CustomClubs that has a certain Category, what is the preffered way of doing that?
Hoping for a solution that doesn´t require writing SQL/HQL queries to the community database as in Joels blogpost.
You can set up queries for your custom entities by adding NHibernate mappings and custom queries. I've been planning to write a blog post about that for quite some time but haven't gotten around to it :( You can use Reflector and take a look at the built in modules though.
Just read this post again and realized that I solved the problem. The answer was to set the EntityTypeOverride attribute on my derived class. After that, just go ahead and use the ClubQuery or any class derived from that.
[EntityTypeOverride(typeof(Club))]CustomClub : Club