On 7 Jan 2009, at 10:37, Loic Nageleisen wrote:
> > Hello everyone, > > Coming from a django and cakephp background, I was recently interested > in mono and C#. I was looking for a good framework like the > aforementioned, with agile capabilities, notably scaffolding. The > Castle Project was an obvious choice. > > I began developping models with Active Record, went on with > configuring the app and nhibernate, created the database schema, and > began scaffolding. Everything I do for now works perfectly, except one > thing: scaffolded controllers can add, list, edit, but refuse to > remove (post-confirm) any element of the database. > > I was using RC3, and then found about the following bug: > > http://support.castleproject.org/projects/MR/issues/view/MR-ISSUE-251 > > So I thought that would be fixed on svn, and downloaded r1005 daily > build. After some minor changes here and there to accomodate for the > various components and external dependencies version bumps, the result > was exactly the same. > > My process was to build with mono 2.0 and a custom Makefile, and run > the wep app under xsp, all that on Mac OS X 10.5.5, which provides > sqlite 3. > > I then thought that may be because of some of those unusual > components, or the app itself, or whatever. So I went on and > downloaded the MonoRail VS2005 example and RC3 msi. Compiled and ran > on a Windows XP machine, with VS2005 and dotNet, connected to a SQL > Server 2005 database. The scaffolded controllers straight from the > example exhibit exactly the same behavior. > > The above issue in the issue tracker makes reference to a missing > flush, but I can't make sense of this in the castle source code, nor > can I find any change post-rc3 in svn regarding this. > > Thanks in advance for the help. > > > Answering to myself, for archive. Method 1: add a Remove(int id) method in the scaffolded controller. Method 2: add sessionscope to httpmodules in web.config, as specified somewhere in the doc. <httpModules> <add name="monorail" type="Castle.MonoRail.Framework.EngineContextModule, Castle.MonoRail.Framework" /> <add name="ar.sessionscope" type="Castle.ActiveRecord.Framework.SessionScopeWebModule, Castle.ActiveRecord" /> </httpModules> It is weird though that the MonoRail tutorial does not have this line. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
