Articles

How to include the Fluent NHibernate discriminator column in a composite key

In our project, we’re sub classing multiple domain classes from a single Reference Data table – i.e. Volume and Weight types. Among other things, the reference data table contains discriminator, code and value columns. The ‘discriminator’ column stores the name of the class and is used by Fluent NHibernate to determine which subclass to instantiate, the ‘value’ column is the full name of the reference data item, and the ‘code’ column is the abbreviated version of the value.
Continue Reading...

ASP.NET MVC - Multiple parameterised form submit buttons without Javascript

The current project I’m working on involves a search page with multiple submit buttons in a single HTML form. Each submit button triggers a different behavior while posting all of the form data to the controller. This method is compatible with both IE 6+ and Firefox. It also avoids the IE button bug where button values are not passed on HTTP POST. After discussing a few design options we decided to allow the user to add the desired search parameters via selecting them one by one from a drop down list.
Continue Reading...

Bitbucket - wrong user on commit

I was having an issue where after pushing my changes to bitbucket, the changesets listed a different user as having pushed the files. For bitbucket, the commit username has to match your bitbucket username. As commits in Mercurial are local, we have no way of controlling that you have set your username correctly. It is important for you to set this up in such a way that we can identify your user account on Bitbucket when you push your commits to us.
Continue Reading...