Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Another thing I have discovered is my custom table has an archived column for "deleted" entries.
Ideally I'd love to be able to add a "WHERE" clause to filter out the archived items. Appreciate this is very specific (as per my other post) but thought I'd throw it out there for consideration.
Yeah that's possible :) you can use the event model to setup the where (you can look at the example project for inspiration)
ALso this post provides some details http://www.nibble.be/?p=493
Awesome - Monday's job at work all sorted...
Below is my code as per your example however it's not getting hit...
I set a break point in the ApplicationStarted method and that gets hit, but I cannot step into the query building method.
public class Startup : ApplicationEventHandler
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
UIOMatic.Controllers.PetaPocoObjectController.BuildedQuery += PetaPocoObjectController_BuildedApplicationStatusQuery;
private void PetaPocoObjectController_BuildedApplicationStatusQuery(object sender, UIOMatic.QueryEventArgs e)
if (e.TableName == "NZTR_ApplicationStatus")
e.Query = Umbraco.Core.Persistence.Sql.Builder
.Append("SELECT NZTR_ApplicationStatus.ApplicationStatusId, NZTR_ApplicationStatus.Name, NZTR_ApplicationStatus.Description, NZTR_ApplicationStatus.color, NZTR_ApplicationStatus.AgedAnalysisNoDaysOK, NZTR_ApplicationStatus.AgedAnalysisNoDaysWarn, NZTR_ApplicationStatus.AnalystName")
.Append("WHERE Archived = 0");
Any ideas ?
ARe you sure about the tablename? Tried setting a breakpoint on the if?
Could you try the following, since if it's only limiting you want to do you only need to set the where https://github.com/TimGeyssens/UIOMatic/blob/master/src/Example/Startup.cs#L40
Have tried setting a break point on the if statement but it isn't getting hit - very weird.
If I put a break point on the line of code within the ApplicationStarted method that gets hit, but I cannot step into the individual method - it simply steps out of the ApplicationStarted method.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted