views:

307

answers:

1

Does the ActiveRecord template files create classes that handle many to many relationships?

+1  A: 

You will get an IQueryable foreign key reference object when the class is generated.

Jeremy Coenen
I assume in that instance, lets say ClassA has an IQueryable to ClassB that ClassB has a foreign key IQueryable to ClassC? That way you can return properties of ClassC when querying stuff in ClassA
Jon
That is correct. I'd recommend downloading the latest bits and playing around. It really only takes about 5 minutes to get up and running. The docs are located here http://subsonicproject.com/docs/ and here is a great 5 minute demo screencast on getting started with subsonic3 http://subsonicproject.com/docs/The_5_Minute_Demo
Jeremy Coenen
Is there a naming convention for Many to Many tables?
Jon
No it sniffs out the foreign key references
Jeremy Coenen
I think this might be a new question but I'm trying to create a foreign key to the ASP.Net Membership Roles table but not sure how to query it as you don't have access to the GUID in the Membership Roles class
Jon
Yeah probably should be a new question. For asp.net membership stuff probably better to just use builtin IsUserInRole stuff from System.Web.Security.Roles but Subsonic can handle this if you got the FKs setup.
Jeremy Coenen