Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tableless models should not require dataSourceName #351
- Loading branch information
Showing
3 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
wheels/tests/model/validations/standard_validations_tableless.cfc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
<cfcomponent extends="standard_validations"> | ||
|
||
<cffunction name="setup"> | ||
<cfset oldDataSourceName = application.wheels.dataSourceName> | ||
<cfset application.wheels.dataSourceName = ""> | ||
<cfset StructDelete(application.wheels.models, "UserTableless", false)> | ||
<cfset loc.user = model("UserTableless").new()> | ||
</cffunction> | ||
|
||
<cffunction name="teardown"> | ||
<cfset application.wheels.dataSourceName = oldDataSourceName> | ||
</cffunction> | ||
|
||
</cfcomponent> |