lib/comicvine/mongo.rb in comicvine-mongo-0.1.0 vs lib/comicvine/mongo.rb in comicvine-mongo-0.1.1
- old
+ new
@@ -257,11 +257,11 @@
belongs_to :origin, class_name: 'ComicVine::Resource::Origin', inverse_of: :characters, validate: false, optional: true
has_and_belongs_to_many :creators, class_name: 'ComicVine::Resource::Person', inverse_of: :created_characters, validate: false
- belongs_to :first_appeared_in_issue, class_name: 'ComicVine::Resource::Issue', inverse_of: :first_appearance_characters, validate: false
+ belongs_to :first_appeared_in_issue, class_name: 'ComicVine::Resource::Issue', inverse_of: :first_appearance_characters, validate: false, optional: true
has_and_belongs_to_many :issue_credits, class_name: 'ComicVine::Resource::Issue', inverse_of: :character_credits, validate: false
has_and_belongs_to_many :issues_died_in, class_name: 'ComicVine::Resource::Issue', inverse_of: :character_died_in, validate: false
has_and_belongs_to_many :movies, class_name: 'ComicVine::Resource::Movie', inverse_of: :characters, validate: false
has_and_belongs_to_many :powers, class_name: 'ComicVine::Resource::Power', inverse_of: :characters, validate: false
@@ -312,11 +312,11 @@
# @since 0.1.0
def count_of_isssue_appearances
self[:count_of_issue_appearances]
end
- belongs_to :first_appeared_in_issue, class_name: 'ComicVine::Resource::Issue', inverse_of: :first_appearance_concepts, validate: false
+ belongs_to :first_appeared_in_issue, class_name: 'ComicVine::Resource::Issue', inverse_of: :first_appearance_concepts, validate: false, optional: true
has_and_belongs_to_many :issue_credits, class_name: 'ComicVine::Resource::Issue', inverse_of: :concept_credits, validate: false
has_and_belongs_to_many :movies, class_name: 'ComicVine::Resource::Movie', inverse_of: :concept_credits, validate: false
has_and_belongs_to_many :volume_credits, class_name: 'ComicVine::Resource::Volume', inverse_of: :concepts, validate: false
end
@@ -400,11 +400,11 @@
field :image, type: Hash
field :name, type: String
field :site_detail_url, type: String
field :start_year, type: Integer
- belongs_to :first_appeared_in_issue, class_name: 'ComicVine::Resource::Issue', inverse_of: :first_appearance_locations, validate: false
+ belongs_to :first_appeared_in_issue, class_name: 'ComicVine::Resource::Issue', inverse_of: :first_appearance_locations, validate: false, optional: true
has_and_belongs_to_many :issue_credits, class_name: 'ComicVine::Resource::Issue', inverse_of: :location_credits, validate: false
has_and_belongs_to_many :movies, class_name: 'ComicVine::Resource::Movie', inverse_of: :location_credits, validate: false
has_and_belongs_to_many :story_arc_credits, class_name: 'ComicVine::Resource::StoryArc', inverse_of: nil, validate: false
has_and_belongs_to_many :volume_credits, class_name: 'ComicVine::Resource::Volume', inverse_of: :locations, validate: false
@@ -483,11 +483,11 @@
field :image, type: Hash
field :name, type: String
field :site_detail_url, type: String
field :start_year, type: Integer
- belongs_to :first_appeared_in_issue, class_name: 'ComicVine::Resource::Issue', inverse_of: :first_appearance_characters, validate: false
+ belongs_to :first_appeared_in_issue, class_name: 'ComicVine::Resource::Issue', inverse_of: :first_appearance_characters, validate: false, optional: true
has_and_belongs_to_many :issue_credits, class_name: 'ComicVine::Resource::Issue', inverse_of: :object_credits, validate: false
has_and_belongs_to_many :movies, class_name: 'ComicVine::Resource::Movie', inverse_of: :objects, validate: false
has_and_belongs_to_many :story_arc_credits, class_name: 'ComicVine::Resource::StoryArc', inverse_of: :objects, validate: false
has_and_belongs_to_many :volume_credits, class_name: 'ComicVine::Resource::Volume', inverse_of: :objects, validate: false
end
@@ -699,11 +699,11 @@
end
belongs_to :publisher, class_name: 'ComicVine::Resource::Publisher', inverse_of: :story_arcs, validate: false
- belongs_to :first_appeared_in_issue, class_name: 'ComicVine::Resource::Issue', inverse_of: :first_appearance_storyarcs, validate: false
+ belongs_to :first_appeared_in_issue, class_name: 'ComicVine::Resource::Issue', inverse_of: :first_appearance_storyarcs, validate: false, optional: true
has_and_belongs_to_many :issues, class_name: 'ComicVine::Resource::Issue', inverse_of: :story_arc_credits, validate: false
has_and_belongs_to_many :movies, class_name: 'ComicVine::Resource::Movie', inverse_of: :story_arc_credits, validate: false
has_and_belongs_to_many :teams, class_name: 'ComicVine::Resource::Team', inverse_of: :story_arc_credits, validate: false
has_and_belongs_to_many :characters, class_name: 'ComicVine::Resource::Character', inverse_of: :story_arc_credits, validate: false
@@ -766,10 +766,10 @@
has_and_belongs_to_many :character_enemies, class_name: 'ComicVine::Resource::Character', inverse_of: nil, validate: false
has_and_belongs_to_many :character_friends, class_name: 'ComicVine::Resource::Character', inverse_of: nil, validate: false
has_and_belongs_to_many :characters, class_name: 'ComicVine::Resource::Character', inverse_of: :teams, validate: false
- belongs_to :first_appeared_in_issue, class_name: 'ComicVine::Resource::Issue', inverse_of: :first_appearance_teams, validate: false
+ belongs_to :first_appeared_in_issue, class_name: 'ComicVine::Resource::Issue', inverse_of: :first_appearance_teams, validate: false, optional: true
has_and_belongs_to_many :issue_credits, class_name: 'ComicVine::Resource::Issue', inverse_of: :team_credits, validate: false
has_and_belongs_to_many :issues_disbanded_in, class_name: 'ComicVine::Resource::Issue', inverse_of: :team_disbanded_in, validate: false
belongs_to :publisher, class_name: 'ComicVine::Resource::Publisher', inverse_of: :teams, validate: false
has_and_belongs_to_many :movies, class_name: 'ComicVine::Resource::Movie', inverse_of: :teams, validate: false