Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ryan McDonough 7 posts 80 karma points c-trib
    Nov 25, 2015 @ 14:38
    Ryan McDonough
    0

    Failed to retrieve data for child nodes undefined

    I have a table with the following structure:

    [dbo].[addonContactFormEntries]
    
    [Id] [int] IDENTITY(1,1) NOT NULL,
    [FullName] [nvarchar](max) NOT NULL,
    [Telephone] [nvarchar](max) NOT NULL,
    [Company] [nvarchar](max) NOT NULL,
    [Reason] [nvarchar](max) NOT NULL,
    

    The following IUIOMaticModel:

       [UIOMatic("Contact Form", "icon-users", "icon-user")]
        [TableName("addonContactFormEntries")]
        public class ContactFormUI : IUIOMaticModel
        {
            public ContactFormUI() { }
    
            [UIOMaticIgnoreField]
            [PrimaryKeyColumn(AutoIncrement = true)]
            public int Id { get; set; }
    
            [UIOMaticField("Full Name", "Enter the persons full name")]
            public string FullName { get; set; }
    
            [UIOMaticField("Telephone", "Enter the persons telephone")]
            public string Telephone { get; set; }
    
            [UIOMaticField("Company", "Enter the persons Company")]
            public string Company { get; set; }
    
            [UIOMaticField("Reason", "Enter the persons Reason")]
            public string Reason { get; set; }
    
            public override string ToString()
            {
                return FullName;
            }
    
            public IEnumerable<Exception> Validate()
            {
                var exs = new List<Exception>();
    
                if (string.IsNullOrEmpty(Reason))
                    exs.Add(new Exception("Please provide a value for first name"));
    
    
    
                return exs;
            }
        }
    

    Now the URL it goes to when I click on the Contact Form link is:

    http://localhost:65326/umbraco#/uiomatic/uioMaticTree/edit/App.Web.Models.ContactFormUI,%20App.Web,%20Version=1.0.0.0,%20Culture=neutral,%20PublicKeyToken=null
    

    When I try to view the entries (of which there are some in the table) I get:

    Received an error from the server
    Failed to retrieve data for child nodes undefined
    
    Object reference not set to an instance of an object.
    
    EXCEPTION DETAILS:
    
    System.NullReferenceException: Object reference not set to an instance of an object.
    STACKTRACE:
    
    at UIOMatic.Controllers.PetaPocoObjectController.<GetAll>d__6.MoveNext()
       at UIOMatic.Trees.UIOMaticTreeController.GetTreeNodes(String id, FormDataCollection queryStrings)
       at Umbraco.Web.Trees.TreeControllerBase.GetNodes(String id, FormDataCollection queryStrings)
       at lambda_method(Closure , Object , Object[] )
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()
    

    Am I missing something, I've checked the docs. I'm running the latest version. Installed with Nuget.

  • Ryan McDonough 7 posts 80 karma points c-trib
    Nov 25, 2015 @ 14:45
    Ryan McDonough
    1

    Fixed: When I picked the namespaces to include I picked:

    using System.Web.DynamicData;
    

    rather than

    using Umbraco.Core.Persistence.DatabaseAnnotations;
    
  • Comment author was deleted

    Nov 25, 2015 @ 16:05

    Ah great, thanks for posting the solution!

  • Jonas 123 posts 206 karma points
    Dec 03, 2015 @ 07:59
    Jonas
    0

    Hi,

    Even though I have the "using Umbraco.Core.Persistence.DatabaseAnnotations" in my code, I get the same error..


    Received an error from the server Failed to retrieve data for child nodes undefined

    Object reference not set to an instance of an object.

    EXCEPTION DETAILS:

    System.NullReferenceException: Object reference not set to an instance of an object. STACKTRACE:

    at UIOMatic.Controllers.PetaPocoObjectController.

  • Ryan McDonough 7 posts 80 karma points c-trib
    Dec 03, 2015 @ 10:21
    Ryan McDonough
    1

    Can you post your entire class and I'll have a look?

  • Comment author was deleted

    Dec 03, 2015 @ 10:36

    Yup if you post your entire class (including the using statements) we can have a look :)

  • Jonas 123 posts 206 karma points
    Dec 03, 2015 @ 11:05
    Jonas
    0

    Hi Tim and Ryan,

    I copied the one from the example and created the table in the Umbraco database..

    using System;
    using System.Collections.Generic;
    using PetaPoco;
    using UIOMatic.Attributes;
    using UIOMatic.Enums;
    using UIOMatic.Interfaces;
    using Umbraco.Core.Persistence.DatabaseAnnotations;
    
    
    namespace HYSW.Models
        {
    
        [UIOMaticAttribute("People","icon-users","icon-user")]
    [TableName("People")]
    public class Person: IUIOMaticModel
    {
        public Person() { }
    
        [UIOMaticIgnoreField]
        [PrimaryKeyColumn(AutoIncrement = true)]
        public int Id { get; set; }
    
        [UIOMaticField("First name","Enter the persons first name")]
        public string FirstName { get; set; }
    
        [UIOMaticField("Last name", "Enter the persons last name")]
        public string LastName { get; set; }
    
        [UIOMaticField("Picture", "Select a picture", View = "file")]
        public string Picture { get; set; }
    
        public override string ToString()
        {
            return FirstName + " " + LastName;
        }
    
        public IEnumerable<Exception> Validate()
        {
            var exs = new List<Exception>();
    
            if(string.IsNullOrEmpty(FirstName))
                exs.Add(new Exception("Please provide a value for first name"));
    
            if (string.IsNullOrEmpty(LastName))
                exs.Add(new Exception("Please provide a value for last name"));
    
    
            return exs;
        }
    
    
    }
    

    enter image description here

    enter image description here

    We are using the PetaPoco database in some views and its working.

    //Jonas

  • Comment author was deleted

    Dec 03, 2015 @ 12:04

    SO your peta poco table is in a different db?

  • Jonas 123 posts 206 karma points
    Dec 03, 2015 @ 12:07
    Jonas
    0

    No, sorry I wrote "Peta Poco database" its in the Umbraco database as you see from the Screenshot. Just below the cmsTemplate table.

    enter image description here

  • Comment author was deleted

    Dec 03, 2015 @ 12:08

    If that is the case, UI-O-Matic needs to know about it so you need to update the attribute

      [UIOMaticAttribute("People","icon-users","icon-user", ConnectionStringName = "MyConnString")]
    
  • Comment author was deleted

    Dec 03, 2015 @ 12:15

    Ok well don't spot an issue with your table or class, any chance you can drop the create script for the table here then I can try to duplicate

  • Jonas 123 posts 206 karma points
    Dec 03, 2015 @ 12:36
    Jonas
    0
    /****** Object:  Table [dbo].[People]    Script Date: 2015-12-03 13:36:14 ******/
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    CREATE TABLE [dbo].[People](
        [Id] [int] IDENTITY(1,1) NOT NULL,
        [FirstName] [nvarchar](255) NOT NULL,
        [LastName] [nvarchar](255) NOT NULL,
        [Picture] [nvarchar](255) NOT NULL
    ) ON [PRIMARY]
    
    GO
    
  • Ryan McDonough 7 posts 80 karma points c-trib
    Dec 03, 2015 @ 12:18
    Ryan McDonough
    0

    Also I'll expect you'll want to include

    using Umbraco.Core.Persistence; 
    

    That is required when using the [TableName] , at least for me.

  • Comment author was deleted

    Dec 03, 2015 @ 12:19

    Ah yes that might be the issue, it might be fetching the TableName attribute from the wrong namespace, make sure like Ryan mentoins it coming from Umbraco.Core.Persistence;

  • Jonas 123 posts 206 karma points
    Dec 03, 2015 @ 12:25
    Jonas
    0

    Hi,

    If i insert

    using Umbraco.Core.Persistence;
    

    Resharper tells me to use

    using Umbraco.Core.Persistence.DatabaseAnnotations;
    

    instead.

    enter image description here

  • Ryan McDonough 7 posts 80 karma points c-trib
    Dec 03, 2015 @ 12:39
    Ryan McDonough
    0

    Use both.

    using Umbraco.Core.Persistence;
    using Umbraco.Core.Persistence.DatabaseAnnotations;
    
  • Jonas 123 posts 206 karma points
    Dec 03, 2015 @ 12:48
    Jonas
    0

    Finally got it thanks....

    using System;
    using System.Collections.Generic;
    using System.Web.DynamicData;
    using UIOMatic.Attributes;
    using UIOMatic.Interfaces;
    using Umbraco.Core.Persistence.DatabaseAnnotations;
    
    
    namespace HYSW.Models
    {
    
        [UIOMatic("SignUp", "icon-users", "icon-user")]
        [Umbraco.Core.Persistence.TableName("People")]
        public class Person : IUIOMaticModel
        {
    
  • Comment author was deleted

    Dec 03, 2015 @ 13:16

    Ah great, it's working now! Let me know if there are any other issues.

  • Jonas 123 posts 206 karma points
    Dec 03, 2015 @ 14:01
    Jonas
    0

    Hi Tim, thanks alot for the help. It is a fantastic package and saves us a lot of time.

    I have a couple of feature questions. Where can I send them?

  • Comment author was deleted

    Dec 03, 2015 @ 14:04

    @Jonas just create a new forum topic and I'll reply there :) glad you like it!

  • Jørgen Bakke Eriksen 44 posts 95 karma points
    Feb 19, 2016 @ 08:56
    Jørgen Bakke Eriksen
    0

    Hi.

    Thought I would give the package a try (it's a great idea for simple tables!) but I get a variant of the error described here:

    Using Umbraco 7.3.8. Note that we are using an Angular frontend and have a lot of controllers extending the UmbracoApiController for our web app. It is a theoretical possibility that this interferes with routing, but this should be fixed since we had a problem with indexing not working which we did some config to get working again.

    Received an error from the server
    Failed to retrieve data for child nodes undefined
    
    Cannot perform runtime binding on a null reference
    
    EXCEPTION DETAILS:
    
    Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference
    STACKTRACE:
    
    at CallSite.Target(Closure , CallSite , Object , Object , Object )
       at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
       at UIOMatic.Trees.UIOMaticTreeController.GetTreeNodes(String id, FormDataCollection queryStrings)
       at Umbraco.Web.Trees.TreeControllerBase.GetNodes(String id, FormDataCollection queryStrings)
       at lambda_method(Closure , Object , Object[] )
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()
    

    I can provide the whole stack trace if necessary.

    My DB table looks like this:

    CREATE TABLE [dbo].[braPocoTest](
       [id] [int] IDENTITY(1,1) NOT NULL,
       [value] [varchar](50) NULL
    )
    

    And my class looks like this:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using UIOMatic.Attributes;
    using UIOMatic.Interfaces;
    using Umbraco.Core.Persistence;
    using Umbraco.Core.Persistence.DatabaseAnnotations;
    
    namespace cms7_0_1.Models
    {
        //[UIOMaticAttribute("Pocotest", "icon-users", "icon-user", ReadOnly = true)]
        [UIOMaticAttribute("Pocotest", "icon-users", "icon-user")]
        [TableName("braPocoTest")]
        public class PocoTest : IUIOMaticModel
        {
            [UIOMaticIgnoreField]
            [PrimaryKeyColumn(AutoIncrement = true)]
            public int id { get; set; }
            [UIOMaticField("value", "Enter the value")]
            public string value { get; set; }
    
            public override string ToString()
            {
                return id + ": - " + value;
            }
    
            public IEnumerable<Exception> Validate()
            {
                var exs = new List<Exception>();
    
                return exs;
            }
        }
    }
    
  • Comment author was deleted

    Feb 19, 2016 @ 08:59

    Hi Jørgen a full stack trace would be useful! Thanks

    Also could you tell me the Umbracco version you are running this on?

    Will then try to replicate the issue.

    Cheers, Tim

  • Jørgen Bakke Eriksen 44 posts 95 karma points
    Feb 19, 2016 @ 09:06
    Jørgen Bakke Eriksen
    0

    Updated the original post now.

  • Comment author was deleted

    Feb 19, 2016 @ 09:10

    Ok thanks for the update will give your code a spin

  • Comment author was deleted

    Feb 19, 2016 @ 09:17

    Ok I get the same behaviour, checking the issue now and will report back a bit later

  • Jørgen Bakke Eriksen 44 posts 95 karma points
    Feb 19, 2016 @ 09:18
    Jørgen Bakke Eriksen
    0

    Ok, great!

    Always good to know that the issue can be reproduced :-)

  • Comment author was deleted

    Feb 19, 2016 @ 09:22

    Seems it's due to the column names and properties starting with a lowercase char, so looks like you found a bug :) fixing now

  • Jørgen Bakke Eriksen 44 posts 95 karma points
    Feb 19, 2016 @ 09:25
    Jørgen Bakke Eriksen
    0

    What's my price? What's my price? ;-)

  • Comment author was deleted

    Feb 19, 2016 @ 09:27

    You'll receive this wonderfull bug hunter hat :p enter image description here

  • Jørgen Bakke Eriksen 44 posts 95 karma points
    Feb 19, 2016 @ 09:29
    Jørgen Bakke Eriksen
    0

    That will rule the after ski this winter :-D

  • Comment author was deleted

    Feb 19, 2016 @ 09:25

    Ok found a fix, just testing now and will release a new version in a couple of moments

  • Comment author was deleted

    Feb 19, 2016 @ 09:33

    New release is building...

  • Comment author was deleted

    Feb 19, 2016 @ 09:35

    OK 1.6.3 is out fixing the lowercase propname issue

    Get it while it's hot: https://www.nuget.org/packages/Nibble.Umbraco.UIOMatic/

    You should just be able to use nuget to upgrade, let me know if that fixes the issue and if you have any further questions.

    Cheers, Tim

  • Jørgen Bakke Eriksen 44 posts 95 karma points
    Feb 19, 2016 @ 09:42
    Jørgen Bakke Eriksen
    0

    Works! Good job and very quick response! Thanks a lot!

  • Comment author was deleted

    Feb 19, 2016 @ 09:43

    Sweet, thanks for confirming!

  • Jørgen Bakke Eriksen 44 posts 95 karma points
    Feb 19, 2016 @ 09:54
    Jørgen Bakke Eriksen
    0

    Works on my simple testclass (which I tried out because I wanted to reduce test compexity). Trying my real life class now and get the same error.

    Class:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using UIOMatic.Attributes;
    using UIOMatic.Interfaces;
    using Umbraco.Core.Persistence;
    using Umbraco.Core.Persistence.DatabaseAnnotations;
    
    namespace cms7_0_1.Models
    {
        [UIOMaticAttribute("Bestillinger", "icon-users", "icon-user", ReadOnly = true)]
        [TableName("braBestillingsPakke")]
        public class BestillingsPakke : IUIOMaticModel
        {
            [UIOMaticIgnoreField]
            [PrimaryKeyColumn(AutoIncrement = true)]
            public int ID_BestillingsPakke { get; set; }
            [UIOMaticField("[FR_Member]", "Enter the memberId ")]
            public int FR_Member { get; set; }
            [UIOMaticField("Startdato", "Skriv inn startdato", View = "datetime")]
            public DateTime StartDato { get; set; }
            [UIOMaticField("Sluttdato", "Skriv inn sluttdato", View = "datetime")]
            public DateTime SluttDato { get; set; }
            [UIOMaticField("[PakkeType]", "Skriv inn PakkeId")]
            public int PakkeType { get; set; }
            [UIOMaticField("[OpprettetDato]", "Skriv inn opprettet dato")]
            public DateTime OpprettetDato { get; set; }
    
            public override string ToString()
            {
                return ID_BestillingsPakke + " - " + FR_Member;
            }
    
            public IEnumerable<Exception> Validate()
            {
                var exs = new List<Exception>();
    
                return exs;
            }
        }
    }
    

    Table:

    CREATE TABLE [dbo].[braBestillingsPakke](
        [ID_BestillingsPakke] [int] IDENTITY(1,1) NOT NULL,
        [FR_Member] [int] NOT NULL,
        [StartDato] [datetime] NULL,
        [SluttDato] [datetime] NULL,
        [PakkeType] [int] NULL,
        [OpprettetDato] [datetime] NULL CONSTRAINT [DF_braBestillingsPakke_OpprettetDato]  DEFAULT (getdate()),
     CONSTRAINT [PK_braBestillingsPakke] PRIMARY KEY CLUSTERED 
    (
        [ID_BestillingsPakke] ASC
    )
    

    Some typo I can't see or a variant of the bug?

  • Comment author was deleted

    Feb 19, 2016 @ 09:59

    Hmmm strange, will give it a shot

  • Comment author was deleted

    Feb 19, 2016 @ 10:13

    Ok can reproduce, thinking it's the underscores, trying to fix now

  • Comment author was deleted

    Feb 19, 2016 @ 10:21

    Ok found a fix, it's due to the id column not being named Id, stupid bug that got introduces by merging a pull request doh, building new version now

  • Comment author was deleted

    Feb 19, 2016 @ 10:27

    Version 1.6.4 is out fixing this issue, again just upgrade using nuget

  • Jørgen Bakke Eriksen 44 posts 95 karma points
    Feb 19, 2016 @ 10:35
    Jørgen Bakke Eriksen
    0

    Works! Excellent! Have a nice weekend!

  • Comment author was deleted

    Feb 19, 2016 @ 11:45

    Same to you!

  • Saad Abdelhaleem 1 post 71 karma points
    Sep 07, 2016 @ 16:51
    Saad Abdelhaleem
    0

    That what happened with me after install ui-o-matic on umbraco v 7.5.3 and run the application and navigate to back-office >>[uiomatic]

    An error occured

    Object reference not set to an instance of an object.

    EXCEPTION DETAILS

    System.NullReferenceException: Object reference not set to an instance of an object.

    at Umbraco.Web.Trees.ApplicationTreeExtensions.TryLoadFromControllerTree(ApplicationTree appTree, String id, FormDataCollection formCollection, HttpControllerContext controllerContext) at Umbraco.Web.Trees.ApplicationTreeController.

    =========

    my code like this:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using UIOMatic.Attributes;
    using UIOMatic.Enums;
    using UIOMatic.Interfaces;
    using Umbraco.Core.Persistence;
    
    namespace Ta2heal.Web.Models.UIOMatic
    {
    
        [Umbraco.Core.Persistence.TableName("ta2healCountry")]
        [Umbraco.Core.Persistence.PrimaryKey("Id")]
        [UIOMatic("Country", "icon-box-open", "icon-box-open", RenderType = UIOMaticRenderType.List, ConnectionStringName = "umbracoDbDSN")]
        public class Country : IUIOMaticModel
        {
            [UIOMaticIgnoreField]
            [Column("Id")]
            public int Id { get; set; }
    
            [Column("Name")]
            public string Name { get; set; }
    
            [Column("IsActive")]
            public bool IsActive { get; set; }
    
            public IEnumerable<Exception> Validate()
            {
                //add validation rules here
                return new List<Exception>();
            }
        }
    
    }
    

    what can I do??

Please Sign in or register to post replies

Write your reply to:

Draft