Is there a way to resolve this error: "CloudKit integration requires does not support ordered relationships." - core-data

I'm trying to use Apple's CoreDataCloudkitDemo app. I've only changed the app settings per their README document. On running the demo, I'm getting the error: "CloudKit integration requires does not support ordered relationships."
(The weird grammar in the title is included in the app)
The console log shows:
Fatal error: ###persistentContainer: Failed to load persistent stores:Error Domain=NSCocoaErrorDomain Code=134060 "A Core Data error occurred." UserInfo={NSLocalizedFailureReason=CloudKit integration requires does not support ordered relationships. The following relationships are marked ordered:
Post: attachments
There is the same error for the "Tags" entity.
I'm using Xcode 11.0 beta 4 (11M374r).
I've only changed the bundle identifier, and set my Team Id.
I removed the original entitlements file - no errors in resulting build.
I've not changed any code from the original.
Does anyone have a workaround, or preferably, a fix? Or did I do something wrong?
Thanks

Firstly, select CoreDataCloudKitDemo.xcdatamodeld -> Post -> RelationShips, select attachments relationship, on the Inspect panel, deselect Ordered, then do the same thing on the tags relationship.
Secondly, there will be some errors in the code now, because we unchecked the Ordered option, the property of attachments and tags in the generated NSManagedObject may changed from NSOrderedSet? to NSSet?. So we could change these error lines of code like below:
Origin:
guard let tag = post?.tags?.object(at: indexPath.row) as? Tag else { return cell }
Changed:
guard let tag = post?.tags?.allObjects[indexPath.row] as? Tag else { return cell }
Finally, you can run the code now. ;-)
Further more, on WWDC19 Session 202, the demo shows they set both attachments and tags relationships as Unordered, so I think there's something wrong in the given demo project.

Related

Docusign API PHP adding listitem to document causes error

I am sure I am not the first to encounter this, but I was unable to find a solution while Googling.
I am trying to add a drop-down list to my document. At the top of my model I am adding these namespaces:
use \DocuSign\eSign\Model\List;
use \DocuSign\eSign\Model\ListItem;
When doing so I get this error because "List" is a reserved word in PHP.
A PHP Error was encountered
Severity: Parsing Error
Message: syntax error, unexpected List (T_LIST), expecting identifier (T_STRING)
Filename: models/Docusign_model.php
Line Number: 19
I tried changing the name of the class from List to Elist but then I got errors from ObjectSerializer that it could not find Elist:swaggerType.
What am I missing on how to add a list to my document?
Thom
#thom I think this is really a "PHP" parsing question as is answered here for you Parse error: syntax error, unexpected (T_STRING), expecting variable (T_VARIABLE)
So I think the $ missing is your real issue as discussed in the referenced article above and below from PHP Manual.
http://www.php.net/manual/en/language.oop5.basic.php
Recommend you look at GIT example from SDK using CustomFieldList at https://github.com/docusign/docusign-php-client/blob/ccc86ac37334f34728361d73b2f8c4592225b8d2/src/Model/CustomFieldsEnvelope.php
excerpt
protected static $swaggerTypes = [
'list_custom_fields' => '\DocuSign\eSign\Model\ListCustomField[]',
'text_custom_fields' => '\DocuSign\eSign\Model\TextCustomField[]'
];
http://www.php.net/manual/en/language.oop5.basic.php
Also, maybe the first place to validate if you even need a specific "use" is by reviewing this PHP sample code from a good friend Ergin https://gist.github.com/Ergin008/d4a8b9210fbea41414b0
As I see it with most of the DocuSign SDK's, you have the client and specific services you want to use per excerpt below:
// Download PHP client: https://github.com/docusign/DocuSign-PHP-Client
require_once './DocuSign-PHP-Client/src/DocuSign_Client.php';
require_once './DocuSign-PHP-Client/src/service/DocuSign_RequestSignatureService.php';
require_once './DocuSign-PHP-Client/src/service/DocuSign_ViewsService.php';
Regardless if I am right or wrong, let us know if this helped you go in the right direction :-)

OpenLayers 3: "Unable to get property 'leaf' of undefined or null reference."

Using Open layers 3.7.0.
I have layer with features. I remove one, build a new similar one, add the new one and I get error message
"Unable to get property 'leaf' of undefined or null reference."
I have searched for what could cause that but search don't give any result.
Some more from the same error (I used v3.8.2 here but got exactly the same:
at rbush.prototype._chooseSubtree (http://openlayers.org/en/v3.8.2/build/ol-debug.js:70778:13)
at rbush.prototype._insert (http://openlayers.org/en/v3.8.2/build/ol-debug.js:70815:9)
at rbush.prototype.insert (http://openlayers.org/en/v3.8.2/build/ol-debug.js:70623:19)
at ol.structs.RBush.prototype.insert (http://openlayers.org/en/v3.8.2/build/ol-debug.js:71178:3)
at ol.source.Vector.prototype.addFeatureInternal (http://openlayers.org/en/v3.8.2/build/ol-debug.js:71589:7)
at ol.source.Vector.prototype.addFeature (http://openlayers.org/en/v3.8.2/build/ol-debug.js:71566:3)
Progress
Where we build the feature we have a projection.
var lineString = new ol.geom.LineString(coordinates);
lineString.transform("EPSG:4326", "EPSG:3857");
var feature = new ol.Feature(lineString);
(...)
If we comment/remove
//lineString.transform("EPSG:4326", "EPSG:3857");
Then there is no bug. By the way that's an hint, not a solution as the features are then not located where they should be.
Solution found
I do not think that this is a perfect soluton but I solved the problem regarding or application by saving the LineStrings in memory instead of re-creating it.
Then I still recreate the Feature from existing LineString.
I got the same error on console and I solved this testing if the features had a valid geometry(coordinates), so I discard the inclusion of the invalid features on the layer source.

Web Api Returning Json - [System.NotSupportedException] Specified method is not supported. (Sybase Ase)

I'm using Web api with Entity Framework 4.2 and the Sybase Ase connector.
This was working without issues returning JSon, until I tried to add a new table.
return db.car
.Include("tires")
.Include("tires.hub_caps")
.Include("tires.hub_caps.colors")
.Include("tires.hub_caps.sizes")
.Include("tires.hub_caps.sizes.units")
.Where(c => c.tires == 13);
The above works without issues if the following line is removed:
.Include("tires.hub_caps.colors")
However, when that line is included, I am given the error:
""An error occurred while preparing the command definition. See the inner exception for details."
The inner exception reads:
"InnerException = {"Specified method is not supported."}"
"source = Sybase.AdoNet4.AseClient"
The following also results in an error:
List<car> cars = db.car.AsNoTracking()
.Include("tires")
.Include("tires.hub_caps")
.Include("tires.hub_caps.colors")
.Include("tires.hub_caps.sizes")
.Include("tires.hub_caps.sizes.units")
.Where(c => c.tires == 13).ToList();
The error is as follows:
An exception of type 'System.Data.EntityCommandCompilationException' occurred in System.Data.Entity.dll but was not handled in user code
Additional information: An error occurred while preparing the command definition. See the inner exception for details.
Inner exception: "Specified method is not supported."
This points to a fault with with the Sybase Ase Data Connector.
I am using data annotations on all tables to control which fields are returned. On the colors table, I have tried the following annotations to limit the properties returned just the key:
[JsonIgnore]
[IgnoreDataMember]
Any ideas what might be causing this issue?
Alternatively, if I keep colors in and remove,
.Include("tires.hub_caps.sizes")
.Include("tires.hub_caps.sizes.units")
then this works also. It seems that the Sybase Ase connector does not support cases when an include statement forks from one object in two directions. Is there a way round this? The same issue occurs with Sybase Ase and the progress data connector.
The issue does not occur in a standard ASP.net MVC controller class - the problem is with serializing two one to many relationships on a single table to JSON.
This issue still occurs if lazy loading is turned on.
It seems to me that this is a bug with Sybase ASE, that none of the connectors are able to solve.

Multiple objects with the same name were found

I'm working on an App for Office that inserts text/images into specific parts of the current Word document, as far as I've investigated, the only way to achieve this is by using ContentControls and creating a binding with:
Office.context.document.bindings.addFromNamedItemAsync();
Now, the problem is that when I have Content Controls inside both, the document body and the header/footer, I'm getting the following error:
Code: 3007
Name: Binding Creation Error
Message: Multiple objects with the same name were found.
According to Microsoft's website!, this is due to 2 or more CCs with the same name; but this is not the case since every CC that I created has an unique name, and when I move all of them to either the header/footer or the body, it works, the error just happens when they are located in different sections of the document.
This is the code I'm using:
Office.context.document.bindings.addFromNamedItemAsync("HeaderLogoCC","text",
{ id: 'logoBinding' }, function (result)
{
if (result.status == "failed")
{
result.error.message == "The named item does not exist."
}
(I know my English is not the best, I apologize in advance for any mistake and I can try to make it more clear, if necessary).
Any help would be really appreciated,
Thanks!

Active Reports chartcontrol giving error

I have created a report in Active Reports (.rpx file) which contains a chartcontrol 'ChartControl1'.
Report Datasource is List which contains 'ItemLabel' and 'ItemValue' fields
Script file contains following line of code.
public void ActiveReport_ReportStart()
{
this.ChartControl1.DataSource = rpt.DataSource;
this.ChartControl1.Series[0].ValueMemberX = "ItemLabel";
this.ChartControl1.Series[0].ValueMembersY = "ItemValue";
}
Apparently i am getting an error which says
"DataSource of type System.String is not supported .Parameter name:
genericDataSource"
and this line is causing the problem.
this.ChartControl1.Series[0].ValueMembersY = "ItemValue";
because if i remove this line , there is no error , but report would not render.
I have read that this error is happening due to incorrect binding , but it is not the case here as i have doublechecked it.
What could be the issue?
This error is usually observed when a string value is assigned to the ValueMemebersY property of chart series, where the string value is not a valid field/column name in the table that is bound to the chart as it’s datasource.
Please refer to the walkthrough which describes how to create an unbound bar chart at runtime with SectionReports (Rpx as well as code based)
You can additionally refer the charting sample that is shipped along with ActiveReports.
You may also refer to the following forum post wherein a sample has been attached showing a similar implementation:
http://our.componentone.com/groups/topic/chart-control-throwing-a-binding-error/
Regards,
Mohita
NewtonCode
what version of product are you using? version 7 or 8? Its a bug. we are going to fix it.

Resources