I am running into one problem after another working with scaffolding, a table structure with one to many relationships and aliased columns. Everything works great if I use the original database object name but if I use the aliased column names I fix one bug only to be stopped by another. Since I don't have a full grasp of the design of Model Glue I'm getting to the point where I believe my fixes are hacks and describing them all will be counter productive. I think it will be easier for whomever to reproduce them. A picture is worth a thousand words kind of thing.
I have attached files that will allow you to easily create my simple schema and the reactor.xml and ModelGlue.xml that works for the object names but not the alias names.
I made it through a number of issues in reactor (which it appears were due to my inexperience) and now I've come out in Model Glue and I ran into a problem where the object name was being used to call getPRE_COLUMN_NAME() instead of using the alias name to call getColumnName(). I fixed that by doing what is below but now I ran into a problem where setPRE_COLUMN_NAME is being called instead of setColumnName at line 377 of D:\Inetpub\wwwroot\ModelGlue\unity\orm\ReactorAdapter.cfc
If there is something you need to know to help me please ask. Thanks.
The first problem was fixed by changing this in
D:\Inetpub\wwwroot\ModelGlue\unity\controller\ReactorORMController.cfc
line 195
was
is now
I also ran into these problems in the xsl files
edit.xsl
had to change select="name"/> to select="alias"/>
<div class="formfield">
<label for="" <cfif structKeyExists(validation, "")>class="error"</cfif>><b>:</b></label>
had to comment out because it wasn't a valid query
<cfif viewstate.exists("|")>
<cfset selectedList = viewstate.getValue("|") />
<cfelse>
<cfset selectedList = valueList(selectedQuery.) />
</cfif>
had to comment out because the query didn't exist because of above
<input type="hidden" name="|" value="" />
<div class="formfieldinputstack">
<cfoutput query="valueQuery">
<label for="_#valueQuery.#"><input type="checkbox" name="|" id="_#valueQuery.#" value="#valueQuery.#"<cfif listFindNoCase(selectedList, "#valueQuery.#")> checked</cfif>/>#valueQuery.#</label><br />
</cfoutput>
</div>