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
2009-06-24 18:20:41
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
2009-06-24 18:24:41
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
2009-06-24 18:42:56
Is there a naming convention for Many to Many tables?
Jon
2009-06-24 18:44:02
No it sniffs out the foreign key references
Jeremy Coenen
2009-06-24 19:10:48
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
2009-06-24 19:20:03
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
2009-06-24 19:32:32