Skip to content

Commit dc85413

Browse files
authored
Merge pull request #1828 from wheels-dev/update-docs
Update docs
2 parents c01a248 + 81435e3 commit dc85413

File tree

3 files changed

+109
-8
lines changed

3 files changed

+109
-8
lines changed

docs/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
* [Switching Environments](working-with-wheels/switching-environments.md)
114114
* [Testing Your Application](working-with-wheels/testing-your-application.md)
115115
* [Using the Test Environment](working-with-wheels/using-the-test-environment.md)
116+
* [Overriding Core Methods](working-with-wheels/overriding-core-methods.md)
116117
* [Contributing to Wheels](working-with-wheels/contributing-to-wheels.md)
117118
* [Contributing to Wheels VS Code Extension](working-with-wheels/contributing-to-wheels-vscode-extension.md)
118119
* [Contributing to Wheels Windows Installer](working-with-wheels/contributing-to-wheels-windows-installer.md)

docs/src/database-interaction-through-models/using-sqlite.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,22 @@ SQLite is different from traditional client-server databases like MySQL, Postgre
4242

4343
SQLite support is built into most CFML engines, but you may need to add the JDBC driver:
4444

45-
#### Lucee
45+
#### Lucee and Adobe ColdFusion
4646

47-
Lucee includes SQLite support by default. No additional installation needed.
48-
49-
#### Adobe ColdFusion
50-
51-
Download the SQLite JDBC driver from [GitHub](https://github.com/xerial/sqlite-jdbc/releases) and place it in your ColdFusion classpath:
47+
Download the SQLite JDBC driver from [GitHub](https://github.com/xerial/sqlite-jdbc/releases) and place it in your server classpath:
5248

5349
```bash
54-
# Copy the JAR to ColdFusion's lib directory
50+
# Copy the JAR to server's lib directory
5551
cp sqlite-jdbc-3.50.3.0.jar /path/to/coldfusion/lib/
5652
```
5753

58-
Restart ColdFusion after adding the driver.
54+
Restart the server after adding the driver.
55+
56+
{% hint style="info" %}
57+
**Note for Adobe ColdFusion 2018:**
58+
Adobe ColdFusion 2018 already ships with a SQLite JDBC driver in its classpath, but this bundled version is outdated and may cause compatibility issues.
59+
To use a newer SQLite version, you should remove the existing SQLite JAR from the ColdFusion classpath and replace it with the latest driver downloaded from GitHub, then restart the server.
60+
{% endhint %}
5961

6062
#### Boxlang
6163

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
## Overriding Core Wheels Methods (Wheels 3.x)
2+
3+
In Wheels 2.5, developers could override core framework methods (such as `findAll`) in their models and call the original Wheels implementation using the `super` scope.
4+
5+
Due to internal framework restructuring in Wheels 3.0, this behavior no longer works using the traditional `super.methodName()` syntax. To restore this capability in a predictable and explicit way, Wheels now provides a new **`super`-prefixed method convention**.
6+
7+
---
8+
9+
### Wheels 2.5 Behavior
10+
11+
In Wheels 2.5, overriding a core model method and calling the original implementation looked like this:
12+
13+
```javascript
14+
component extends="Model" {
15+
16+
function findAll() {
17+
// custom logic here
18+
19+
return super.findAll();
20+
}
21+
22+
}
23+
```
24+
25+
This worked because Wheels core methods were directly accessible via the `super` scope.
26+
27+
---
28+
29+
### Why This Changed in Wheels 3.0
30+
31+
Wheels 3.0 introduced a significant internal reorganization of the framework to support:
32+
33+
- improved extensibility
34+
- cleaner separation of concerns
35+
- better compatibility with multiple runtimes
36+
37+
As a result, calling core methods using `super.methodName()` is no longer reliable or supported in the same way.
38+
39+
---
40+
41+
### New Approach in Wheels 3.0+
42+
43+
To override a core Wheels method and still call the original implementation, you now use a **`super`-prefixed method name**.
44+
45+
Instead of calling:
46+
47+
```
48+
super.findAll()
49+
```
50+
51+
You call:
52+
53+
```
54+
superFindAll()
55+
```
56+
57+
---
58+
59+
### Example: Overriding `findAll()`
60+
61+
```javascript
62+
component extends="Model" {
63+
64+
function findAll() {
65+
// custom logic before calling Wheels core method
66+
67+
return superFindAll();
68+
}
69+
70+
}
71+
```
72+
73+
This allows you to:
74+
75+
- safely override any core Wheels method
76+
- explicitly call the original Wheels implementation
77+
- avoid framework internals or brittle inheritance behavior
78+
79+
---
80+
81+
### Key Notes
82+
83+
- The `superMethodName()` convention applies only when overriding a core Wheels method
84+
- Method names are case-insensitive, following normal CFML rules
85+
- This behavior is available in Wheels 3.x and later
86+
- No changes are required for applications that do not override core methods
87+
88+
---
89+
90+
### Migration Tip for Wheels 2.5 Applications
91+
92+
If you are upgrading an application from Wheels 2.5 to 3.0+ and have overridden core methods:
93+
94+
1. Search for usages of `super.methodName()`
95+
2. Replace them with `superMethodName()`
96+
3. Test overridden behavior to ensure expected results
97+
98+
This small change restores the same extension capability that existed in Wheels 2.5, while remaining compatible with the updated framework architecture.

0 commit comments

Comments
 (0)