Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9175053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:51:10+00:00 2026-06-17T16:51:10+00:00

The only thing I could find about enum support in breeze.js is this feature

  • 0

The only thing I could find about enum support in breeze.js is this feature suggestion on uservoice, which was recently marked as closed in 0.82.
I’m using currently latest, 0.84.3.

UPDATE:
I’m using code first in EF 5.0.0 with .net 4.5. When starting application and breeze makes request for metadata, EF creates empty database and my enum property is in database as int, so that part is ok.

However, when I added an enum property to my model, I got exception when breeze tried to parse metadata:

Uncaught Error: Unable to locate an 'Type' by the name: ItemType:#TestApp.Models breeze.debug.js:5051
getTypeFromMap breeze.debug.js:5051
ctor.getEntityType breeze.debug.js:5028
ctor._updateProperty breeze.debug.js:6056
ctor._fixup breeze.debug.js:6133
ctor._fixup breeze.debug.js:6132
ctor.addEntityType breeze.debug.js:4702
convertFromODataEntityType

This is my model (simplified):

public enum ItemType
  {
    Ordered,
    Approved,
    Misc
  }

public class Item 
  {

    public long Id { get; set; }

    public ItemType Type { get; set; }

  }

Where am I making mistake? Is there working sample with enum?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:51:11+00:00Added an answer on June 17, 2026 at 4:51 pm

    I just tried adding your ItemType enum to one of our models ( the ToDo model in the breeze DocCode sample) without a problem.

    I am not sure what you are running into. So two suggestions,

    1) Try updating (hack) the DocCode sample that ships within the breeze samples zip to use your ItemType enum ( details below) and then run any of the basic ToDo tests.

    // In DocCode/Models/ToDoItem.cs
    namespace Todo.Models 
    {
        public class TodoItem 
        {
            public int Id { get; set; }                     // 42
    
            [Required, StringLength(maximumLength: 30)]     // Validation rules
            public string Description { get; set; }         // "Get milk"
    
            public System.DateTime CreatedAt { get; set; }  // 25 August 2012, 9am PST
            public bool IsDone { get; set; }                // false
            public bool IsArchived { get; set; }            // false
            // YOUR ENUM PROPERTY
            public ItemType Type { get; set; }
        }
    
        // YOUR ENUM TYPE
        public enum ItemType {
          Ordered,
          Approved,
          Misc
        }
    
    }
    
    // In DocCode/Models/ToDoDatabaseInitializer
    private static TodoItem CreateTodo(string description, bool isDone, bool isArchived)
    {
        _baseCreatedAtDate = _baseCreatedAtDate.AddMinutes(1);
        return new TodoItem
        {
            CreatedAt = _baseCreatedAtDate,
            Description = description,
            IsDone = isDone,
            IsArchived = isArchived,
            // YOUR ENUM PROPERTY
            Type = ItemType.Ordered
        };
    }
    

    or

    2) Send me (Jay Traband) a stripped down version of your project at breeze@ideablade.com.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

the only thing i know about this subject is... in PHP 5, when a
I have a string which is lost forever. The only thing I have about
I have to ask this, because: The only thing I recognize is, that if
I got this comma separated file with a bunch of numbers The only thing
I bet that I could find the answer of this question from reading similar
I'm about to launch a multi-domain affiliate sites which have one thing in common
I'm already searching for two days about this and can't find my answer... I
Been searching but the only thing I found was http://evain.net/blog/articles/2009/07/30/rebasing-system-reactive-to-the-net-clr which I got to
i'm using FAYE and rails application and the only thing tha annoys me very
I need to get information on variables and the only thing I have is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.