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 7090621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:04:38+00:00 2026-05-28T08:04:38+00:00

Based on the data model here: Photographer<——->>Photo When the user goes to add a

  • 0

Based on the data model here: Photographer<——->>Photo

When the user goes to add a Photo, the user also specifies what Photographer took said picture. When the user decides to save the Photo, there is the possibility that the Photographer doesn’t exist yet. After executing a NSFetchRequest to get a list of all instances of Photographer, how do I check if the NSMutableArray(photographerArray) contains an object that has the same fullName attribute as what the user is currently adding?

  • 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-05-28T08:04:39+00:00Added an answer on May 28, 2026 at 8:04 am

    The naive way would be to simply get all the fullName of the array and check if it’s in it.

    BOOL photographerExist = [[listOfPhotographer valueForKey:@"fullName"] containsObject:enteredFullName];
    

    However, it would be way more easier to put that directly in your fetch request. Just add a predicate to it.

    NSPredicate *fullNamePredicate = [NSPredicate predicateWithFormat:@"fullName = %@", enteredFullName];
    fetchRequest.predicate = fullNamePredicate;
    

    If the result of the fetch is empty, then the photographer doesn’t exist yet.

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

Sidebar

Related Questions

Based on the data model below And based on user input I create a
I'm building a gui component that has a tree-based data model (e.g. folder structure
I have an Entity Data Model-based app that uses SQL Server CE 3.5 as
After obtaining data from a model form based on a Model, say form_data =
The steps I go through... Add new ADO.NET Entity Data Model > Generate from
I am using a model-based form to create a form based off a data
here is my core data model: Locations < --- >> ThemesList << --- >
I'm building a tree-based data structure and overloaded [ ] so that I can
I am developing a PHP web based data entry tool with MySQL as the
Is there any easy/general way to clean an XML based data source prior to

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.