SubSonic 2.1 Final

July 8, 2008 19:22

Today’s a day that many of you thought would never come: the final release of SubSonic 2.1! It’s been a long time coming, and we hope you’ll feel it has been worth the wait. For those following the SVN revisions, this release is built on Revision 472.

On a side note, CodePlex has been experiencing some problems with Work Items over the past few days, so please be patient if you’re submitting bug reports. Recent problems aside, we know that the bug submission process is less than ideal, something that we will be remedying very shortly.

But enough of my blabbing… Go download it already!

Download SubSonic 2.1 Final 

FIxes and Changes from Release Candidate 1

Work Item 15065 - SubStage Should Provide Option to Control Code Generation Output Directory
Work Item 15768 - DB.Update() Doesn't Allow Multiple SETs
Work Item 16936 - Aggregates With Where (Not Having) Creates bad SQL (testcase included)
Work Item 16949 - VB_StructsTemplate.aspx Does Not Properly Escape "Select" Methods
Work Item 17075 - DB.Save() Doesn't Insert Records if the PrimaryKey is not AutoIncrement
Work Item 17075 - ANSISqlGenerator.PAGING_SQL Contains Incorrect Paging Definition
Work Item 11763 - SqlDataProvider.GetSelectSql() - ORDER BY Columns Must be in SelectList When IsDistinct=true
Work Item 16983 - Various Turkish Character Set String Comparison Issues
Work Item 17031 - Generated VB.Net DB.Save() and DB.Get() Signatures are Invalid
Work Item 17041 - SubStage Doesn't Save Generated Code Language
Work Item 17073 - PrimaryKey Methods Not Generated When Using SQLite Data Provider
Work Item 17157 - Patch for Improved Implementation of SqlQuery.GetRecordCount()
Work Item 17173 - Stored Procedures Dropping QueryCommand Parameters
Work Item 17187 - DB.Save() Doesn't Insert Records When Primary Key is UNIQUEIDENTIFIER
Work Item 17245 - Aggregates With Where (Not Having) Creates bad SQL (testcase included) - Updated Patch
Work Item 17264 - Namespace Parsing Error in CodeRunner.GetTypeName()

11 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

HigherFox

June 9, 2008 19:59

UPDATE 6/25/2008: I’ve made a few changes to the source code and updated the executable to deal with some compatibility issues with extensions that don’t employ the “em:” prefix in install.rdf. Also, the application should no longer leave the temp directory around if it fails to patch the file. If you’re encountering either of these issue, please try the newer version.

If you follow the beta and RC builds of Firefox, you’ve probably found that at least a few of your add-ons from previous versions are blocked with the new builds, ostensibly for compatibility reasons. If you’ve done a bit more digging, you’ve probably found that there are some ways around this blocking, which involve opening the .xpi extension files (which is really just a renamed .zip), making changes to the maxVersion attribute of install.rdf, and updating the archive.

While this isn’t a terribly difficult process, it can be a bit of pain if you have a number of .xpi’s that you want to update. To make this process a bit easier, I threw together a quick application that makes the process a good deal simpler, by allowing you to drop target one or more xpi files and have them automatically patched up to whatever version you specify.

image

HigherFox simply extracts the contents of the .xpi files that are dragged onto it, updates the maxVersion attribute for Firefox (it doesn’t touch values for Flock, Netscape, etc.), and then repacks all the components into a new archive that is save at the source location as <original_xpi_name>_patched.xpi.

It goes without saying that patching .xpi files is a poor alternative to installing official releases from the author. Moreover, there is no guarantee that the extension will actually be compatible in the version of Firefox you’re running. However, if you’re still waiting for your favorite plug-in to be officially updated, this might just be the hack that you’re looking for.

Thanks to DotNetZip for their nice little ZIP library that let me keep this in a single executable!

Download HigherFox (26K)

Download HigherFox Source Code (58K)


6 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Important Notice Regarding Early SubSonic 2.1 RC 1 Downloads

June 5, 2008 10:10

This morning, forum member JonasHi alerted us to a serious bug in the RC 1 SqlServer and SqlServerCE data providers. Due a stupid mistake, I introduced a bug in Revision 444 of the source code which could have the effect of truncating fields at 50 characters when performing commit operations. I have since fixed the issue, committed a fix to SVN (Revision 448), and updated the installer and source distributions on CodePlex.

However, if you downloaded the RC 1 installer or source code before 10:05 AM EST on June 5th, please download an updated version. You may notice that both the source and installer files are about 1.5 MB smaller than before, resulting from the unrelated removal of an unused archive in the Dependencies folder.

We apologize for any inconvenience this may have caused. I will be adding some additional unit tests to cover this and other related scenarios to reduce the likelihood of similar bugs in the future...


1 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

SubSonic 2.1 Release Candidate 1

June 4, 2008 18:44

UPDATE: A potentially serious bug was discovered in RC 1. It is now fixed, but please see this post if you downloaded either the installer or source code prior to 10:05 AM EST on June 5th.

Another release, another blog post... Man, I'm slacking...

We're pleased to announce the immediate availability of Release Candidate 1 of SubSonic 2.1. Nothing new or snazzy to announce in this build, just a good old pile of bug fixes for a code base that's looking pretty damn solid.

If you've been holding off on the 2.1 releases until things calmed down a bit, I urge you to finally take the plunge. This release is far more solid than the production 2.0.3 build. So dig in, and as always, keep the Work Items coming!

Download SubSonic 2.1 Release Candidate 1


Release Candidate 1 Fix/Feature List

Work Item 11506 - InvalidCastException When Using Nullable Boolean Types in MySql (Re-Opened)
Work Item 12946 - SQL Stored Procedures Don't Set Scale or Precision
Work Item 15073 - QuickTable Incorrectly Calculates Paging Values
Work Item 15074 - SQLiteDataProvider Paging is Off by One
Work Item 15075 - MySqlDataProvider Paging is Off by One
Work Item 15169 - MarkOld() Should Set IsLoaded="true"
Work Item 15844 - Wrong Database Object Name Generated in SqlQuery Select Clause When Using Table Joins
Work Item 16101 - MySqlInnoDBProvider - Alias Casings do not Match in MANY_TO_MANY_CHECK_ALL and MANY_TO_MANY_FOREIGN_MAP_ALL
Work Item 16110 - SqlQuery Aggregate Operations Inappropriately Replace WHERE with HAVING
Work Item 16165 - CS_ViewTemplate.ascx Does Not Escape SchemaName Setting
Work Item 16180 - Template Generated Code Wraps When "namespace" is Encountered Anywhere in Output
Work Item 16181 - QuickTable Improperly Qualifies Column Names When Where Clauses are Used
Work Item 16257 - VB_ClassTemplate.aspx Hasn't Been Updated to Reflect RepositoryRecord Changes
Work Item 16259 - ExecuteJoinedDataSet() Fails When Using an AddBetweenAnd Clause
Work Item 16326 - SqlQuery.Paged() Does Not Work With MySql Provider
Work Item 16392 - QuickTable Improperly Prefixes WHERE Clauses
Work Item 16424 - Nullable INT Values Not Properly Converted With Oracle Provider
Work Item 16429 - DB.Update() Does Not Set IsLoaded="true" (Duplicate)
Work Item 16463 - SqlQuery InnerJoin Results in Null Reference Exception When DataProvider is not Set
Work Item 16468 - DB.Update() Does Not Set IsLoaded="true"
Work Item 16513 - Empty or Null Lists Passed to Query.IN() Should Return No Results
Work Item 16532 - ExecuteSingle<T>() Leaves Open DataReader
Work Item 16547 - Where() Operations on Collections Do Not Support Comparision.In and Comparison.NotIn
Work Item 16548 - ExecuteJoinedDataSet() Improperly Performs JOINs on 1-to-1 PK/FK Relations
Work Item 16573 - DB.Update() Does Not Set IsLoaded="true" (Patch)
Work Item 16746 - SqlDataProvider/SqlCEProvider Incorrectly Translates VARCHAR Types to NVARCHAR
Work Item 16847 - DB.Insert(of T)(Row) Always Returns "0"
Work Item 16859 - Turkish Character-Set Issue in TableSchema.SetValue()
Work Item 16869 - Globalization Issues in SugarTests.Numbers_IsNumeric() and QueryTest.Query_OR_Between()
Work Item 16871 - Query Fails When Used With More Than One OrderBy Condition
Work Item 16874 - DataProvider.GetDbCommand() Doesn't Convert QueryParameter to DBParameter Before Adding to DBCommand Collection
Work Item 16894 - SQL Stored Procedures Don't Set Scale or Precision (Duplicate)
Work Item 16897 - Query.NOT_IN Is Not Handled Properly
Work Item 16898 - ExecuteJoinedDataSet Fails When Using IN/NotIN Clause
Work Item 12090 - Migration (Rails)
Work Item 16226 - 2.1 Feature Request: ExecuteAsSingle

8 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

SubSonic 2.1 Beta 3

April 10, 2008 18:55

Well, these days it looks like it takes a new SubSonic release to get me to actually write a blog post, so I guess I'll have to crank up the rate that we're putting out builds! In any event, I'm happy to announce the third beta of SubSonic 2.1 is now available on CodePlex. There are a ton of fixes in this release, and it's starting to look very solid, with core already faster and more solid that 2.0.3. The next milestone will be Release Candidate 1, which we will get to GA as fast we can, especially since we're very anxious to start taking advantage of the C# 3.0 language features.

While we're not officially announcing it, so as to properly set initial expectations, this release features the first migration capabilities, which Rob and Shawn have poured a ton of work in to. But if you're brave, and feeling like diving into the code, have at it.

I'd also like to extend a special thanks to Yitzchok AKA adminjew for his contributions to this release. Yitzchok not only contributed a really nice patch that allows providers to be loaded from external assemblies, he has truly embraced the often thankless job of moderating the forums, answering question after question while people like me get to do the fun stuff. Thank you Yitzchok!

Beta 3 Fix/Feature List
Work Item 11714 - DataReader Exceptions Can Cause Memory Leaks
Work Item 11740 - Scripting May Fail With Large Schemas/Data Sets
Work Item 11933 - Views Are Not Properly Paged Under Sql Server 2000
Work Item 12375 - WriteTrace Throws Security Exception with Medium Trust
Work Item 12786 - WriteTrace Throws Security Exception with Medium Trust (Duplicate)
Work Item 14660 - LoadFromPost() Doesn't Fill DirtyColumn Collection
Work Item 15015 - SubStage Generates Controller Classes when RepositoryRecord is Used
Work Item 15469 - SqlQuery Doesn't Perform Type Conversion on Constraint Values
Work Item 15590 - SqlDataProvider.ExecuteTransaction must not close the DB connection
Work Item 15594 - SqlQuery: Aggregates/Tables not aliased properly when using OracleDataProvider
Work Item 15596 - SubSonic.Sugar.Dates Incorrectly Identifies Weekends/Weekdays
Work Item 15605 - RepositoryRecord not Tagged as [Serializable]
Work Item 15649 - ExecuteJoinedDataSet Throws Exception When Sorting on Joined Column
Work Item 15652 - SqlQuery.CloseExpression() Causes "Index was Outside the Bounds of the Array" Error
Work Item 15660 - Many-to-Many Save[ClassName]Map Delete Methods Do Not Specify Data Type When Adding Parameters
Work Item 15661 - Many-to-Many Save[ClassName]Map Methods Use Incorrect Data Type for Foreign Primary Key
Work Item 15688 - ANSISqlGenerator.GenerateConstraints() Does Not Set DbType
Work Item 15689 - SqlQuery.SetConstraintParams() Loses Parameters When Building "NotIn" Queries
Work Item 15696 - Sql2005Generator.BuildPagedSelectStatement() Sets Incorrect Paging Boundaries
Work Item 15725 - AndExpression/OrExpression Improperly Identify a Closed Expression as Open
Work Item 15747 - Object Names in the Form "[Name]TypeCode" are Inexplicably Changed to "[Name]Type"
Work Item 15753 - SqlCE Provider Incorrectly Set CommandTimeout Value
Work Item 15771 - ExecuteJoinedDataSet Incorrectly Inserts "PK" Column When First Ordinal Column Is a Foreign Key
Work Item 15779 - SqlQuery: INNER JOIN with WHERE Clause Can Result in 'Ambiguous column name' Error
Work Item 15795 - Repository Get[ObjectName] Methods Leave Open Data Readers
Work Item 15796 - SubStage Doesn't Fully Refresh Database Schema
Work Item 15799 - SqlQuery: INNER JOIN with WHERE Clause Can Result in 'Ambiguous column name' Error (Duplicate)
Work Item 15823 - SqlQuery.SetConstraintParams() Loses Parameters When Building "NotIn" Queries (Duplicate)
Work Item 15841 - ANSISqlGenerator.GenerateCommandLine() Does Not Properly Comma-Delimit Select List When Passing Literal Values
Work Item 15939 - GetValue<T>(string columnName) in TableSchema May Fail with Non-Nullable GUIDs
Work Item 16012 - SqlQuery.ExecuteScalar() Does Not Properly Handle/Cast DBNull Return Values
Work Item 15616 - Option to Use UTC Format for Managed DateTime Fields
Work Item 15978 - Patch to Support DataProviders in External Assemblies
Work Item 15996 - DataProvider.GetSPList() Should Return Stored Procedures in Alphabetical Order

Thanks again to everyone who contributed to this release. Keep the feedback and Work Items coming!

Download SubSonic 2.1 Beta 3


7 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

SubSonic 2.1 Beta 2

March 11, 2008 14:21

I'm pleased to announce the immediate availability of SubSonic 2.1 Beta 2. This release contains a significant collection of bug fixes for issues in SubSonic 2.1 Beta 1, as well as some minor functional enhancements to the new SqlQuery engine and SubStage.

Thanks to everyone who contributed to this release through patches, bug reports, and feedback... Keep 'em coming!

Finally, I'd like to extend a special thanks to Shawn Oster, who jumped on board recently and made some great contributions to this release, including making sure that all our unit tests are finally green :)

Download SubSonic 2.1 Beta 2


2 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Scaffold Enhancements in SubSonic 2.1

February 8, 2008 08:48

Among the new features coming in SubSonic 2.1 are some incremental enhancements to the existing Scaffold functionality. Here's a quick rundown of these changes, which you can see in the current beta release posted on CodePlex

ScaffoldType
With the 2.1, AutoScaffold is now a "mode" of the existing scaffold control. This mode is enabled by setting the ScaffoldType property to "Auto", as opposed to the default "Normal" setting. When set to Auto, the scaffold adds two new drop down menus above the grid, allowing a provider and class to be selected. In all other ways, the behavior is functionally identical to a scaffold running in "Normal" mode.

AutoGenerateManyToMany
This boolean value, set to true by default will automatically cause the scaffold to generate many to many mapping controls at the bottom of the edit form for any tables identified as Many to Many. The functionality uses the mechanism that identifies tables as M2M at code generation time. If this mode is too "permissive" in identifications techniques, you can still specify tables using the existing ManyToManyMap approach.

UseEmbeddedStyles
Without styles applied, the scaffolds can look a bit, well, ugly. However, when the UseEmbeddedStyles property is set to true, the scaffolds will now dynamically emit a style sheet at runtime which should make them look a bit more presentable out of the box.

DropDownCssClass, CheckBoxCssClass
It is now possible to specify a CSS class to be used for DropDown and CheckBox controls when they appear in the scaffolds.

Updated CRUD Operations
Prior to 2.1, the scaffold used inline SQL construction to perform all CRUD operations. As of this release, these operations are now performed using the new query engine. Ideally, this should reduce the number of issues encountered when using the scaffolds across different provider types.

As always, we welcome your feedback...


5 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

SubStage WebCast

February 4, 2008 17:39

Consider it a beta, just like the application... Tongue out

View Webcast


15 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Documentation: It's my Cilice

December 6, 2007 17:00

I've neglected SubSonic for far too long, and it's time for me to wear my hair shirt. For me, this means making a concerted effort on something that ranks with being forced to watch holiday jewelry ads, Clockwork Orange style, on my list of least favorite things to do. However, it's the best way to pay my penance, and bring some substance to Rob's recent assertion. :)

I've started the process with Revision 217, which is, for the most part a code formatting clean up. Given the fact that properly documenting the code base requires touching almost every file, I'm trying to do frequent check-ins so as to avoid code merge hell.

The next pass is to get GhostDoc stubs in throughout the code base, (with whatever goofy auto generated comments it may produce) so that the overall comment and line counts are stabilized as quickly as possible and the current generated documentation stops looking like one big sea of red. Finally, I'll be doing a pass over the entire collection ensuring that everything is completely and accurately annotated.

To stay sane, I'm still be attacking work items in the process, so make sure that any outstanding bugs you've discovered have made it onto CodePlex, to be included in our well-documented 2.0.4 release. Sorry, no date commitment yet... 


6 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Query me this...

October 31, 2007 15:54

I hate piggybacking on blog responses, but occasionally the topics are just so timely that it's hard not to. If you haven't checked out Jeff Atwood's latest post and Rob's response to it, I recommend taking a look. Like Rob, I take issue with the characterization of the query engine as being wrapped in "proprietary SubSonic object noise." However, given that I am currently rewriting the query engine with a focus on righting wrongs, I am interested in any feedback on the existing model, particularly its shortcomings.

I have come to the conclusion that there is no "correct" way to structure the query syntax. In undertaking this rewrite, I attempted to identify some sort of common way of a "diagramming" SQL statements in they way students do with sentences (or would if grammar was still part of our primary school curriculum and they weren't spending all their time doing standardized test prep. No child left behind!). For simple examples, this is possible, at least to a limited degree. Take following example from the Wikipedia SQL entry:

 

image

 

Unfortunately, this is not terribly meaningful, and really doesn't provide much of foundation for any kind of logical class structure, let alone an intuitive syntax and grammar, even if you don't support JOINs or predicate grouping.

One of the mistakes we made with the first version of the query engine was trying too hard to hard to "port" SQL into SubSonic, to the point of including our much-maligned uppercase clause methods. (take that FxCop!) Once again, this works well for simple cases, but falls flat when it comes to more complex scenarios, or what some would call "real world."

If SQL were a true standard, providing syntactical parity might make more sense. However, having spent several days poring through specifications for SQL-92, or at least what there is of it that's freely available without shelling out big bucks for a copy of ISO 9075, I began to under why the SQL syntax landscape is such a sloppy mess.

Finally, let us not forget that SQL is no panacea. Injections attacks aside, there are good reasons why so much effort is spent trying to avoid writing it. For me, the prime example is the inclusion of spatial constructs into the core syntax, which raises this question:

Does a RIGHT JOIN become a LEFT JOIN if you're using an Arabic or Hebrew character set?


2 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed