Welcome, Guest
Username Password: Remember me

Accessing sub entity properties
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Accessing sub entity properties

Accessing sub entity properties 1 year, 6 months ago #1

Hi!

I'm trying to access a sub entity property in the manner as displayed below. Basically i have a task entity that is related to multiple house entity. The house entity as a property named room that i want to access. I'm creating this scpropertydefinition so that my user can select only rooms previously created by name.


 
SCPropertyDefinition *housePropertyDef = [taskClassDef propertyDefinitionWithName:@"house"];
 
housePropertyDef.type = SCPropertyTypeObjectSelection;
 
housePropertyDef.attributes = [SCObjectSelectionAttributes attributesWithItemsEntityClassDefinition:houseClassDef
withItemsTitlePropertyName:@"room.name"
allowMultipleSelection:NO
allowNoSelection:NO];
 


This throws an error. Changing withItemsTitlePropertyName:@"house.room" to withItemsTitlePropertyName:@"house" doesn't throw an error though it displays "Item: 0". Could this be a kvc style issue? Is the fact that the house property of the task class is a relationship a matter?

Thanks!
  • codebonbon
  • OFFLINE
  • Expert Boarder
  • Posts: 149
  • Karma: 8

Re: Accessing sub entity properties 1 year, 6 months ago #2

Thanks a lot Harold for reporting this, we will fix it and send you an update ASAP.

BTW, setting withItemsTitlePropertyName to @"house" should not work as @"house" is probably not an attribute of the house entity defined by houseClassDef.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: Accessing sub entity properties 1 year, 6 months ago #3

My bad!

I meant withItemsTitlePropertyName:@"room.name" and withItemsTitlePropertyName:@"room".

Thanks!
  • codebonbon
  • OFFLINE
  • Expert Boarder
  • Posts: 149
  • Karma: 8

Re: Accessing sub entity properties 1 year, 5 months ago #4

Hi!

I was wondering if there was any updates on this issue?

Keep up the good work!

Thanks!
  • codebonbon
  • OFFLINE
  • Expert Boarder
  • Posts: 149
  • Karma: 8

Re: Accessing sub entity properties 1 year, 5 months ago #5

Hi Harold,

This update should be available within the next couple of days. Also, you might be interested to know that we have just released the beta version of our next release: www.sensiblecocoa.com/forum/announcement...0-beta-released.html
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: Accessing sub entity properties 1 year, 5 months ago #6

Hi Harold,

We've added your request to our STV 2.0 beta 2 release. I'll send you a copy right away. Please tell me if it works well for you. Thanks!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72
  • Page:
  • 1
Time to create page: 3.16 seconds