Core Data modal entity objects creation getting unexpected results - ios

I am using CoreData for my Project.
In first image i selected Site to create the entity object.
After clicking the next. If you see the second image, Game files are created.
Here i want to create entity object for Site, But it is creating Game entity object. Please help me out.

Make sure the class name in the right hand panel is what you want it to be. You can also access this in the configuration editor for the Default configuration.
Right side panel
Configuration

Related

SAPUI5 - Refrech OData model

I'm working on a SAPUI5 Master Detail application with Odata model Two Way Binding.
When I click on a header element and enter data for its items and click submit, the entered data is still there.
Even if I click on another Header element, if I go back to the previous header element its data is still there.
I want the entire model to be completely refreshed on every click on a header element.
I tried SubmitChanges method, but it's not working ...
Check out the below sap archive
https://archive.sap.com/discussions/thread/3649362

Saving a sql file after creating a Controller?

Visual Studio wants me to save a sql file dbo.Table.sql after I create a Controller for the model that represents the table in my database. The tutorials and documentation that I find online do not mention this at all.
http://www.w3schools.com/aspnet/mvc_models.asp
http://www.asp.net/mvc/overview/getting-started/database-first-development/generating-views
So it opens up a safe dialogue after I specified the Model and Context and press add on the Add Controller dialogue. The path starts in my Documents folder but I am not sure where to safe this, I would logically place this in App_Data.
So why does it ask me to safe the sql file?
And where do I need to store it?
And perhaps, why is this not mentioned in the documentation? I'm pretty sure I am doing it in the same manner. Create SQL Server -> Add tables -> Add Model -> Add MVC5 Controller with views using Entity Framework
The answer is simple, I had a typo in my Model class so it did not find the table, you can see it in the screenshot. If you ask me it would be better to throw a warning when adding a controller that does not have a correctly mapped table and give the option to create a local script file for it. On the other hand, now I know this it's probably obvious.

Magical record , core data migration for released app in Appstore

Our app got released in app store and now I wanted work on next version. Here I might add property and entity to current model .
I am using core data with Magical record .
I need help on core data migration with magical record .
I am already using [MagicalRecord setupCoreDataStackWithAutoMigratingSqliteStoreNamed:#"xxxxxxx"]; in app delegate .
As per my understand MR will take care of migration if we use above method .
Should I need to do any changes in Model.xcdatamodeld like adding model version (Editor->Add model Version) .
Please help me how can migrate core data.
To build on #casademora answer who obviously knows a lot more about MR than me, here is what got stuff working for me. The key is reading the Apple docs as suggested.
highlight your existing .xcdatamodel and then click Editor > Add model version > name it with an increment from your previous (i.e. if "myapp" use "myapp 2" as suggested in xcode.
make your changes on the newly created .xcdatamodel.
highlight the parent .xcdatamodel and then on the File Inspector on the right of xcode select your new version as the current Model Version.
NOTE: This step is only required if doing more than a Lightweight Migration. Select File > New > File > Core Data > Mapping Model. Choose your original as source, new as target and then save in the same folder as your .xcdatamodel.
make sure you are using setupAutoMigratingCoreDataStack or setupCoreDataStackWithAutoMigratingSqliteStoreNamed of course
test by downloading the app from app store and opening it, then closing and running debug over the top. You should not get any "Removed incompatible model version" messages (i.e. all persistent data should be in place still) or any other errors.
That method simply enables auto migrations to happen when you have multiple versions of a data model in your application bundle. To add a new version of a data model, you'll need to select your data model in Xcode, and in the menu select Editor -> Add Model Version... From there, Xcode will do the proper setup for you. This is also a fairly simple idea, it creates a new data model file, that starts off as the contents of your current data model file. From there, you can change and edit your data model as you see fit. Be aware that only simple changes are "automatic". Adding a new property is valid if it has a default value. Adding a new entity falls into the automatic category as well. I suggest reading more details about Core Data Migrations from Apple's Official Documentation

How to detect the deleted data entry in Orchard cms Database?

I have created a module in Orchard cms, in which I created a form to collect the data and also added a image field(media). Now I have created a separate view(.chtml) to display the list of data that are collected from form in module in admin section.
Now suppose I added few data, let it be two entry in the form and I display all the two entry in newly created separate view. But When I delete the one of entry in form in admin section, it deleted and disappear there, but it is still present in database and visible in my newly created separate view. Can anyone please help me to know, how to detect the delete entry in Orchard Cms Database. I think it is soft deleted, because it is still in database but not showing in admin view section (dashboard).
Yes, Orchard always does soft deletes on content items. There are two boolean flags - Published and Latest - kept in table Orchard_Framework_ContentItemVersionRecord for each version. If both are false, the version is considered deleted. If there is no published and latest version for a given item, the whole item is considered deleted.
If a deleted item still appears in your custom view, you're probably doing some custom query in your code and you may need to revisit it. ContentManager fetches published versions by default (Get and Query methods) only.

More than one collection not working anymore in Google Drive?

We use extensively (from an application) in the Document List API the fact than a file / document can be assigned to more than one collection, in order to work in a similar way that labels. Has this been deprecated? At least from the web user interface, only one folder can be assigned to one file.
Working fine here and multiple collections can be successfully assigned.
Right click a file, Choose "Organise" and check the box next to each collection you want the document to be a part of.

Resources