v8.0 - Web Designer - Using Fill Collection on database object

Hi Experts

I have a requirement where I need to load a large number of PersonWantsOrg (PWO) objects and have a number of calculated properties on each record. This is quite slow to do in the front end, so instead I have written a SQL query and I load a Custom collection (database query) to run this query and load all the records.

Now, I'm using Fill Collection to populate the PWO collection using my custom collection instead of loading the PWO collection from the database, however it is not copying all the columns from my custom collection into the PWO collection. For instance, all the CustomProperty columns are not being copied. I have ensure my custom collection has all the properties in the PWO table as well, and I'm filling the PWO collection using a simple query

from PWOToDecide_SQL select *

Any suggestions as to why column values are not being copied using fill collection?



PS: I also tried with the following

from PWOToDecide_SQL select (CustomProperty10,DisplayPersonOrdered)

I have verified both columns are present in my custom SQL collection PWOToDecide_SQL. The code snippet generated is as follows

VI.WebRuntime.ColumnInsertValues _insertValues2 = new VI.WebRuntime.ColumnInsertValues();
this.PWOToDecide.Insert(new VI.WebRuntime.ResultSet(new string[] {
"CustomProperty10", "DisplayPersonOrdered"}, this.PWOToDecide_SQL.Select(row_PWOToDecide_SQL =>
VI.WebRuntime.IDataColumn _CustomProperty1053 = this.PWOToDecide_SQL.GetColumn("CustomProperty10");
VI.WebRuntime.IDataColumn _DisplayPersonOrdered27 = this.PWOToDecide_SQL.GetColumn("DisplayPersonOrdered");
return new VI.WebRuntime.ResultSetRow(new object[] {
_CustomProperty1053.GetValue(row_PWOToDecide_SQL).String, _DisplayPersonOrdered27.GetValue(row_PWOToDecide_SQL).String});
)), 2147483647, _insertValues2);