class OData::PropertyMetadata

Internally used helper class for storing an entity property's metadata. This class shouldn't be used directly.

Attributes

association[RW]

Applies only to navigation properties; the association corresponding to the property

fc_keep_in_content[R]

Should the property appear in both the mapped schema path and the properties collection

fc_target_path[R]

Feed customization target path

is_key[RW]

Applies to the primary key(s)

name[R]

The property name

nav_prop[R]

Is the property a navigation property?

nullable[R]

Is the property nullable?

type[R]

The property EDM type

Public Class Methods

new(property_element) click to toggle source

Creates a new instance of the Class Property class

@param [Nokogiri::XML::Node] property_element from the EDMX

# File lib/ruby_odata/property_metadata.rb, line 25
def initialize(property_element)
  @name =                 property_element['Name']
  @type =                 property_element['Type']
  @nullable =             ((property_element['Nullable'] && property_element['Nullable'] == "true") || property_element.name == 'NavigationProperty') || false
  @fc_target_path =       Helpers.get_namespaced_attribute(property_element, 'FC_TargetPath', 'm')
  keep_in_content =       Helpers.get_namespaced_attribute(property_element, 'FC_KeepInContent', 'm')
  @fc_keep_in_content  =  (keep_in_content) ? (keep_in_content == "true") : nil
  @nav_prop =             property_element.name == 'NavigationProperty'
end