• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Validation error in a relationship? (in coredata)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Validation error in a relationship? (in coredata)


  • Subject: Re: Validation error in a relationship? (in coredata)
  • From: "dexter.cocoa dexter" <email@hidden>
  • Date: Mon, 15 Oct 2007 22:13:47 +0200

Oh damn, I've tried to make a 1:n relationship to solve the previous
described problem. However I've a similar error with the 1:1 rel.
You can see it below, while this is my schema
(http://img100.imageshack.us/img100/5711/immagine1gr2.png) and this
the code for two used subclasses of nsmanagedobject if it can be
usefull... but it's a normal class (ANTStArticle:
http://paste.lisp.org/display/49214 - ANTStArticle_Content:
http://paste.lisp.org/display/49215)

-------METHOD
- (ANTStArticle_Content *) _getContentArchive {
	ANTStArticle_Content *archive = [self valueForKeyPath:STARTICLE_KEY_ARCHIVE];

	if (archive == nil) {
		archive = [[ANTStArticle_Content alloc] initWithEntity: [self
_getEntityFromBundle: @"DRAFT_CONTENT"]
					insertIntoManagedObjectContext:[[NGSharedDrafts sharedDrafts]
managedObjectContext]];

		[self setValue: archive forKey: STARTICLE_KEY_ARCHIVE];
	}
	return archive;
}


--------ERROR
NSError "draft_content is not valid." Domain=NSCocoaErrorDomain
Code=1550 UserInfo={
    NSLocalizedDescription = "draft_content is not valid.";
    NSValidationErrorKey = "draft_content";
    NSValidationErrorObject = <ANTStArticle: 0xbc25f0> (entity: DRAFT;
id: 0xe1da250 <x-coredata:///DRAFT/t36F12C85-17FC-4C1E-BC84-D0D3490AD65A>
; data: {
    "draft_connection" = 0;
    "draft_content" = 0xe1e6d20
<x-coredata:///DRAFT_CONTENT/t41A06899-D700-46E6-ABEE-6214CCB16700>;
    "draft_isSentArticle" = 0;
    "draft_isSuspended" = 0;
    "draft_locked" = 0;
    "draft_markAndSendNextTime" = nil;
    "draft_messageID" = "<email@hidden>";
    "draft_newsgroups" = nil;
    "draft_profile" = 0;
    "draft_replyToID" = nil;
    "draft_sendLaterTime" = nil;
    "draft_sentDate" = nil;
    "draft_signName" = -1;
});
    NSValidationErrorValue = <ANTStArticle_Content: 0xe1de780>
(entity: DRAFT_CONTENT; id: 0xe1e6d20
<x-coredata:///DRAFT_CONTENT/t41A06899-D700-46E6-ABEE-6214CCB16700> ;
data: {
    "body_text" = fddfdf;
    "headers_data" = <040b7374 7265616d 74797065 6481e803 84014084
8484134e 534d7574 61626c65 44696374 696f6e61 72790084 840c4e53 4469>;
});
}
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Validation error in a relationship? (in coredata)
      • From: Chris Hanson <email@hidden>
    • Re: Validation error in a relationship? (in coredata)
      • From: Ron Lue-Sang <email@hidden>
References: 
 >Re: Validation error in a relationship? (in coredata) (From: Ron Lue-Sang <email@hidden>)

  • Prev by Date: Re: Binding NSPopupButton crashes
  • Next by Date: Re: Memory leaks with NSAppleScript
  • Previous by thread: Re: Validation error in a relationship? (in coredata)
  • Next by thread: Re: Validation error in a relationship? (in coredata)
  • Index(es):
    • Date
    • Thread