瀏覽代碼

Core data versioned.

Iñigo Valentin 9 年之前
父節點
當前提交
5bf6dc562a

+ 4 - 16
app.xcodeproj/project.pbxproj

@@ -33,7 +33,6 @@
 		936966EF1E9848D600A11055 /* RowAlbum.xib in Resources */ = {isa = PBXBuildFile; fileRef = 936966EE1E9848D600A11055 /* RowAlbum.xib */; };
 		936966F11E984B5000A11055 /* RowAlbum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 936966F01E984B5000A11055 /* RowAlbum.swift */; };
 		937EA02D1E5B8B5300D0893A /* UIApplcation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 937EA02C1E5B8B5300D0893A /* UIApplcation.swift */; };
-		93899D531F4845CD00E76D2C /* V2.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 93899D511F4845CD00E76D2C /* V2.xcdatamodeld */; };
 		938D211D1EA2275300C47EC3 /* LablancaView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 938D211C1EA2275300C47EC3 /* LablancaView.xib */; };
 		938D211F1EA2306300C47EC3 /* LablancaView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 938D211E1EA2306300C47EC3 /* LablancaView.swift */; };
 		93B408031D9ED44C000FBC99 /* MenuCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93B408021D9ED44C000FBC99 /* MenuCollectionViewCell.swift */; };
@@ -97,6 +96,7 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
+		9306A7441F4E05C30032BEFB /* app2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = app2.xcdatamodel; sourceTree = "<group>"; };
 		93075C691E59CAB000396389 /* BlogView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BlogView.xib; sourceTree = "<group>"; };
 		93075C6B1E59CB6B00396389 /* BlogView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlogView.swift; sourceTree = "<group>"; };
 		93075C6F1E59D04A00396389 /* RowBlog.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowBlog.swift; sourceTree = "<group>"; };
@@ -123,7 +123,6 @@
 		936966EE1E9848D600A11055 /* RowAlbum.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RowAlbum.xib; sourceTree = "<group>"; };
 		936966F01E984B5000A11055 /* RowAlbum.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowAlbum.swift; sourceTree = "<group>"; };
 		937EA02C1E5B8B5300D0893A /* UIApplcation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIApplcation.swift; sourceTree = "<group>"; };
-		93899D521F4845CD00E76D2C /* V2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = V2.xcdatamodel; sourceTree = "<group>"; };
 		938D211C1EA2275300C47EC3 /* LablancaView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LablancaView.xib; sourceTree = "<group>"; };
 		938D211E1EA2306300C47EC3 /* LablancaView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LablancaView.swift; sourceTree = "<group>"; };
 		93B408021D9ED44C000FBC99 /* MenuCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MenuCollectionViewCell.swift; path = ../MenuCollectionViewCell.swift; sourceTree = "<group>"; };
@@ -133,7 +132,7 @@
 		93B84B991D9C31AB006C0F67 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		93B84B9B1D9C31AB006C0F67 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
 		93B84B9E1D9C31AB006C0F67 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
-		93B84BA11D9C31AB006C0F67 /* app.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = app.xcdatamodel; sourceTree = "<group>"; };
+		93B84BA11D9C31AB006C0F67 /* app.xcdatamodel */ = {isa = PBXFileReference; explicitFileType = wrapper.xcdatamodel; path = app.xcdatamodel; sourceTree = "<group>"; };
 		93B84BA31D9C31AB006C0F67 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		93B84BA61D9C31AB006C0F67 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
 		93B84BA81D9C31AB006C0F67 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -242,7 +241,6 @@
 				93B84BA31D9C31AB006C0F67 /* Assets.xcassets */,
 				93D8B0931EF1A64C008BD946 /* Notifications.swift */,
 				93B84BA01D9C31AB006C0F67 /* app.xcdatamodeld */,
-				93899D511F4845CD00E76D2C /* V2.xcdatamodeld */,
 				93B84BA51D9C31AB006C0F67 /* LaunchScreen.storyboard */,
 				93B84B991D9C31AB006C0F67 /* AppDelegate.swift */,
 				93B84B9D1D9C31AB006C0F67 /* Main.storyboard */,
@@ -445,7 +443,6 @@
 				93E0C5F41EBE306900905811 /* ScheduleViewController.swift in Sources */,
 				936966F11E984B5000A11055 /* RowAlbum.swift in Sources */,
 				93D9EA641DE273FD00089002 /* Section.swift in Sources */,
-				93899D531F4845CD00E76D2C /* V2.xcdatamodeld in Sources */,
 				93D9EA6A1DE3491100089002 /* HomeView.swift in Sources */,
 				93E0C5EE1EBE25BD00905811 /* RowLabel.swift in Sources */,
 				93BEB6D21E7E878300C68DE5 /* PostViewController.swift in Sources */,
@@ -672,22 +669,13 @@
 /* End XCConfigurationList section */
 
 /* Begin XCVersionGroup section */
-		93899D511F4845CD00E76D2C /* V2.xcdatamodeld */ = {
-			isa = XCVersionGroup;
-			children = (
-				93899D521F4845CD00E76D2C /* V2.xcdatamodel */,
-			);
-			currentVersion = 93899D521F4845CD00E76D2C /* V2.xcdatamodel */;
-			path = V2.xcdatamodeld;
-			sourceTree = "<group>";
-			versionGroupType = wrapper.xcdatamodel;
-		};
 		93B84BA01D9C31AB006C0F67 /* app.xcdatamodeld */ = {
 			isa = XCVersionGroup;
 			children = (
+				9306A7441F4E05C30032BEFB /* app2.xcdatamodel */,
 				93B84BA11D9C31AB006C0F67 /* app.xcdatamodel */,
 			);
-			currentVersion = 93B84BA11D9C31AB006C0F67 /* app.xcdatamodel */;
+			currentVersion = 9306A7441F4E05C30032BEFB /* app2.xcdatamodel */;
 			path = app.xcdatamodeld;
 			sourceTree = "<group>";
 			versionGroupType = wrapper.xcdatamodel;

+ 2 - 2
app/Base.lproj/LaunchScreen.storyboard

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
         <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
         <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
         <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>

+ 54 - 47
app/EventController.swift

@@ -54,54 +54,61 @@ class EventController: UIViewController, UIGestureRecognizerDelegate {
 	*/
 	override func viewDidLoad() {
 		
-		// Populate photo array.
+		// TODO: Pas this
+		let margolari: Bool = true
+		
 		let context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
 		let appDelegate = UIApplication.shared.delegate as! AppDelegate
 		let lang : String = getLanguage()
 		context.persistentStoreCoordinator = appDelegate.persistentStoreCoordinator
-		let fetchRequest: NSFetchRequest<Festival_event> = Festival_event.fetchRequest()
-		fetchRequest.predicate = NSPredicate(format: "id = %i", id)
-		do {
-			let searchResults = try context.fetch(fetchRequest)
-			var name: String = ""
-			var text: String = ""
-			var start: NSDate
-			var placeId: Int = -1
-			var place: [Any]
-			var placeName: String = ""
-			var placeAddress: String = ""
-			var lat: Double = 0.0
-			var lon: Double = 0.0
-			if searchResults.count > 0{
-				let r = searchResults[0]
+		if (margolari == true){
+			
+			let fetchRequest: NSFetchRequest<Festival_event_gm> = Festival_event_gm.fetchRequest()
+			fetchRequest.predicate = NSPredicate(format: "id = %i", id)
+			do {
+				// Get the result
+				let searchResults = try context.fetch(fetchRequest)
+			
+				var name: String = ""
+				var text: String = ""
+				var start: NSDate
+				var placeId: Int = -1
+				var place: [Any]
+				var placeName: String = ""
+				var placeAddress: String = ""
+				var lat: Double = 0.0
+				var lon: Double = 0.0
+				if searchResults.count > 0{
+					let r = searchResults[0]
 				
-				name = r.value(forKey: "title_\(lang)")! as! String
-				if r.value(forKey: "description_\(lang)") != nil{
-					text = r.value(forKey: "description_\(lang)")! as! String
-				}
-				start = r.value(forKey: "start")! as! NSDate
-				placeId = r.value(forKey: "place")! as! Int
-				place = getPlace(place: placeId, lang: getLanguage(), context: context)
-				placeName = place[0] as! String
-				placeAddress = place[1] as! String
-				lat = place[2] as! Double
-				lon = place[3] as! Double
+					name = r.value(forKey: "title_\(lang)")! as! String
+					if r.value(forKey: "description_\(lang)") != nil{
+						text = r.value(forKey: "description_\(lang)")! as! String
+					}
+					start = r.value(forKey: "start")! as! NSDate
+					placeId = r.value(forKey: "place")! as! Int
+					place = getPlace(place: placeId, lang: getLanguage(), context: context)
+					placeName = place[0] as! String
+					placeAddress = place[1] as! String
+					lat = place[2] as! Double
+					lon = place[3] as! Double
 				
-				// Set labels
-				eventTitle.text = " \(name.decode().stripHtml())"
-				if text.length > 0{
-					eventText.text = " \(text.decode().stripHtml())"
-				}
-				else{
-					self.eventText.isHidden = true
-				}
-				self.eventTime.text = formatTime(date: start)
-				self.eventLocation.text = placeName.decode().stripHtml()
-				if placeAddress.length == 0 || placeAddress == placeName{
-					self.eventAddress.isHidden = true
-				}
-				else{
-					self.eventAddress.text = placeAddress.decode().stripHtml()
+					// Set labels
+					eventTitle.text = " \(name.decode().stripHtml())"
+					if text.length > 0{
+						eventText.text = " \(text.decode().stripHtml())"
+					}
+					else{
+						self.eventText.isHidden = true
+					}
+					self.eventTime.text = formatTime(date: start)
+					self.eventLocation.text = placeName.decode().stripHtml()
+					if placeAddress.length == 0 || placeAddress == placeName{
+						self.eventAddress.isHidden = true
+					}
+					else{
+						self.eventAddress.text = placeAddress.decode().stripHtml()
+					}
 				}
 				
 				// Set map marker
@@ -115,12 +122,12 @@ class EventController: UIViewController, UIGestureRecognizerDelegate {
 				let camera: GMSCameraPosition = GMSCameraPosition.camera(withLatitude: lat, longitude: lon, zoom: 12.0)
 				self.eventMap.camera = camera
 				
-			}
 			
-		}
-		catch {
-			NSLog(":EVENT:ERROR: Error getting info from event \(id): \(error)")
-		}
+			}
+			catch {
+				NSLog(":EVENT:ERROR: Error getting info from event \(id): \(error)")
+			}
+		} // if margolari == true
 		
 		super.viewDidLoad()
 		

+ 46 - 47
app/ScheduleViewController.swift

@@ -243,65 +243,64 @@ class ScheduleViewController: UIViewController, UIGestureRecognizerDelegate {
 		var locationId: Int
 		var location: String
 
-		let fetchRequest: NSFetchRequest<Festival_event> = Festival_event.fetchRequest()
-		let sortDescriptor = NSSortDescriptor(key: "start", ascending: true)
-		let sortDescriptors = [sortDescriptor]
-		fetchRequest.sortDescriptors = sortDescriptors
-		
-		if margolari == true{
-			fetchRequest.predicate = NSPredicate(format: "(gm = %i) AND (day = %@)", argumentArray: [1, days[selectedDay]])
-		}
-		else{
-			fetchRequest.predicate = NSPredicate(format: "(gm = %i) AND (day = %@)", argumentArray: [0, days[selectedDay]])
-		}
-				
 		do {
 			
 			// Get the result
-			let searchResults = try self.context?.fetch(fetchRequest)
+			let searchResults: NSFetchRequest<NSFetchRequestResult>
+			
 			
-			for r in searchResults! {
+			if margolari == true{
+				let fetchRequest: NSFetchRequest<Festival_event_gm> = Festival_event_gm.fetchRequest()
+				let sortDescriptor = NSSortDescriptor(key: "start", ascending: true)
+				let sortDescriptors = [sortDescriptor]
+				fetchRequest.sortDescriptors = sortDescriptors
+				let searchResults = try self.context?.fetch(fetchRequest)
+			
+				for r in searchResults! {
 				
-				id = r.value(forKey: "id") as! Int
+					id = r.value(forKey: "id") as! Int
 				
-				title = r.value(forKey: "title_\(lang!)") as! String
-				if r.value(forKey: "description_\(lang!)") != nil{
-					text = r.value(forKey: "description_\(lang!)") as! String
-				}
-				else{
-					text = ""
-				}
-				start = r.value(forKey: "start")! as! NSDate
-				locationId = r.value(forKey: "place")! as! Int
-				row = RowSchedule.init(s: "rowSchedule\(rowcount)", i: rowcount)
+					title = r.value(forKey: "title_\(lang!)") as! String
+					if r.value(forKey: "description_\(lang!)") != nil{
+						text = r.value(forKey: "description_\(lang!)") as! String
+					}
+					else{
+						text = ""
+					}
+					start = r.value(forKey: "start")! as! NSDate
+					locationId = r.value(forKey: "place")! as! Int
+					row = RowSchedule.init(s: "rowSchedule\(rowcount)", i: rowcount)
 				
-				row.setTitle(text: title)
-				row.setText(text: text)
-				row.setTime(dtime: start)
-				row.id = id
+					row.setTitle(text: title)
+					row.setText(text: text)
+					row.setTime(dtime: start)
+					row.id = id
 				
-				// Get location info from Place entity
-				let locationFetchRequest: NSFetchRequest<Place> = Place.fetchRequest()
-				locationFetchRequest.predicate = NSPredicate(format: "id == %i", locationId)
-				locationFetchRequest.fetchLimit = 1
-				do{
-					var locationSearchResults = try self.context?.fetch(locationFetchRequest)
-					if (locationSearchResults?.count)! > 0{
-						let locationR = locationSearchResults?[0]
-						location = locationR?.value(forKey: "name_\(lang!)")! as! String
-						row.setLocation(text: location)
+					// Get location info from Place entity
+					let locationFetchRequest: NSFetchRequest<Place> = Place.fetchRequest()
+					locationFetchRequest.predicate = NSPredicate(format: "id == %i", locationId)
+					locationFetchRequest.fetchLimit = 1
+					do{
+						var locationSearchResults = try self.context?.fetch(locationFetchRequest)
+						if (locationSearchResults?.count)! > 0{
+							let locationR = locationSearchResults?[0]
+							location = locationR?.value(forKey: "name_\(lang!)")! as! String
+							row.setLocation(text: location)
+						}
+						else{
+							row.setLocation(text: "")
+						}
 					}
-					else{
-						row.setLocation(text: "")
+					catch {
+						NSLog(":SCHEDULECONTROLLER:ERROR: Error getting location: \(error)")
 					}
-				} catch {
-					NSLog(":SCHEDULECONTROLLER:ERROR: Error getting location: \(error)")
-				}
 				
-				svScheduleList.addArrangedSubview(row)
+					svScheduleList.addArrangedSubview(row)
 				
-				rowcount = rowcount + 1
-			}
+					rowcount = rowcount + 1
+				}
+				
+			} // if margolari == true
 
 			svScheduleList.setNeedsLayout()
 			svScheduleList.layoutIfNeeded()

+ 32 - 28
app/V2.xcdatamodeld/V2.xcdatamodel/contents

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="12141" systemVersion="16F73" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
+<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="12141" systemVersion="16F73" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="2">
     <entity name="Activity" representedClassName="Activity" syncable="YES" codeGenerationType="class">
         <attribute name="after_en" optional="YES" attributeType="Float" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="after_es" optional="YES" attributeType="String" syncable="YES"/>
@@ -17,7 +17,7 @@
         <attribute name="title_en" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="title_es" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="title_eu" optional="YES" attributeType="String" syncable="YES"/>
-        <relationship name="album." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Album" syncable="YES"/>
+        <relationship name="album_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Album" syncable="YES"/>
     </entity>
     <entity name="Activity_comment" representedClassName="Activity_comment" syncable="YES" codeGenerationType="class">
         <attribute name="activity" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
@@ -26,14 +26,14 @@
         <attribute name="lang" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="text" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="username" optional="YES" attributeType="String" syncable="YES"/>
-        <relationship name="activity." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Activity" syncable="YES"/>
+        <relationship name="activity_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Activity" syncable="YES"/>
     </entity>
     <entity name="Activity_image" representedClassName="Activity_image" syncable="YES" codeGenerationType="class">
         <attribute name="activity" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="idx" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="image" optional="YES" attributeType="String" syncable="YES"/>
-        <relationship name="activity." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Activity" syncable="YES"/>
+        <relationship name="activity_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Activity" syncable="YES"/>
     </entity>
     <entity name="Activity_itinerary" representedClassName="Activity_itinerary" syncable="YES" codeGenerationType="class">
         <attribute name="activity" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
@@ -48,14 +48,14 @@
         <attribute name="place" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="route" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="start" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
-        <relationship name="activity." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Activity" syncable="YES"/>
-        <relationship name="place." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" syncable="YES"/>
-        <relationship name="route." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" syncable="YES"/>
+        <relationship name="activity_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Activity" syncable="YES"/>
+        <relationship name="place_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" syncable="YES"/>
+        <relationship name="route_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" syncable="YES"/>
     </entity>
     <entity name="Activity_tag" representedClassName="Activity_tag" syncable="YES" codeGenerationType="class">
         <attribute name="activity" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="tag" optional="YES" attributeType="String" syncable="YES"/>
-        <relationship name="activity." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Activity" syncable="YES"/>
+        <relationship name="activity_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Activity" syncable="YES"/>
     </entity>
     <entity name="Album" representedClassName="Album" syncable="YES" codeGenerationType="class">
         <attribute name="description_en" optional="YES" attributeType="String" syncable="YES"/>
@@ -105,10 +105,10 @@
         <attribute name="title_en" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="title_es" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="title_eu" optional="YES" attributeType="String" syncable="YES"/>
-        <relationship name="host." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="People" syncable="YES"/>
-        <relationship name="place." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" syncable="YES"/>
-        <relationship name="route." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" syncable="YES"/>
-        <relationship name="sponsor." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="People" syncable="YES"/>
+        <relationship name="host_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="People" syncable="YES"/>
+        <relationship name="place_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" syncable="YES"/>
+        <relationship name="route_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" syncable="YES"/>
+        <relationship name="sponsor_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="People" syncable="YES"/>
     </entity>
     <entity name="Festival_event_gm" representedClassName="Festival_event_gm" syncable="YES" codeGenerationType="class">
         <attribute name="description_en" optional="YES" attributeType="String" syncable="YES"/>
@@ -125,12 +125,16 @@
         <attribute name="title_en" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="title_es" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="title_eu" optional="YES" attributeType="String" syncable="YES"/>
-        <relationship name="host." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="People" syncable="YES"/>
-        <relationship name="place." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" syncable="YES"/>
-        <relationship name="route." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" syncable="YES"/>
-        <relationship name="sponsor." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="People" syncable="YES"/>
+        <relationship name="host_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="People" syncable="YES"/>
+        <relationship name="place_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" syncable="YES"/>
+        <relationship name="route_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" syncable="YES"/>
+        <relationship name="sponsor_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="People" syncable="YES"/>
+    </entity>
+    <entity name="Festival_event_image" representedClassName="Festival_event_image" syncable="YES" codeGenerationType="class">
+        <attribute name="festival_event" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="idx" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="image" optional="YES" attributeType="String" syncable="YES"/>
     </entity>
-    <entity name="Festival_event_image" representedClassName="Festival_event_image" syncable="YES" codeGenerationType="class"/>
     <entity name="Festival_offer" representedClassName="Festival_offer" syncable="YES" codeGenerationType="class">
         <attribute name="days" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="description_en" optional="YES" attributeType="String" syncable="YES"/>
@@ -142,7 +146,7 @@
         <attribute name="name_eu" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="price" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="year" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
-        <relationship name="year." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Festival" syncable="YES"/>
+        <relationship name="year_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Festival" syncable="YES"/>
     </entity>
     <entity name="Notification" representedClassName="Notification" syncable="YES" codeGenerationType="class">
         <attribute name="action" optional="YES" attributeType="String" syncable="YES"/>
@@ -186,8 +190,8 @@
     <entity name="Photo_album" representedClassName="Photo_album" syncable="YES" codeGenerationType="class">
         <attribute name="album" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="photo" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
-        <relationship name="album." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Album" syncable="YES"/>
-        <relationship name="photo." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Photo" syncable="YES"/>
+        <relationship name="album_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Album" syncable="YES"/>
+        <relationship name="photo_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Photo" syncable="YES"/>
     </entity>
     <entity name="Photo_comment" representedClassName="Photo_comment" syncable="YES" codeGenerationType="class">
         <attribute name="dtime" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
@@ -196,7 +200,7 @@
         <attribute name="photo" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="text" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="username" optional="YES" attributeType="String" syncable="YES"/>
-        <relationship name="photo." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Photo" syncable="YES"/>
+        <relationship name="photo_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Photo" syncable="YES"/>
     </entity>
     <entity name="Place" representedClassName="Place" syncable="YES" codeGenerationType="class">
         <attribute name="address_en" optional="YES" attributeType="String" syncable="YES"/>
@@ -229,19 +233,19 @@
         <attribute name="post" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="text" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="username" optional="YES" attributeType="String" syncable="YES"/>
-        <relationship name="post." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Post" syncable="YES"/>
+        <relationship name="post_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Post" syncable="YES"/>
     </entity>
     <entity name="Post_image" representedClassName="Post_image" syncable="YES" codeGenerationType="class">
         <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="idx" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="image" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="post" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
-        <relationship name="post." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Post" syncable="YES"/>
+        <relationship name="post_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Post" syncable="YES"/>
     </entity>
     <entity name="Post_tag" representedClassName="Post_tag" syncable="YES" codeGenerationType="class">
         <attribute name="post" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="tag" optional="YES" attributeType="String" syncable="YES"/>
-        <relationship name="post." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Post" syncable="YES"/>
+        <relationship name="post_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Post" syncable="YES"/>
     </entity>
     <entity name="Route" representedClassName="Route" syncable="YES" codeGenerationType="class">
         <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
@@ -258,9 +262,9 @@
         <attribute name="place_d" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="place_o" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
         <attribute name="route" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
-        <relationship name="place_d." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" syncable="YES"/>
-        <relationship name="place_o." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" syncable="YES"/>
-        <relationship name="route." optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" syncable="YES"/>
+        <relationship name="place_d_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" syncable="YES"/>
+        <relationship name="place_o_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" syncable="YES"/>
+        <relationship name="route_r" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" syncable="YES"/>
     </entity>
     <entity name="Sponsor" representedClassName="Sponsor" syncable="YES" codeGenerationType="class">
         <attribute name="address_en" optional="YES" attributeType="String" syncable="YES"/>
@@ -293,7 +297,7 @@
         <element name="Festival_day" positionX="-497" positionY="1061" width="128" height="163"/>
         <element name="Festival_event_city" positionX="-380" positionY="446" width="128" height="313"/>
         <element name="Festival_event_gm" positionX="-711" positionY="731" width="128" height="313"/>
-        <element name="Festival_event_image" positionX="-686" positionY="1143" width="128" height="45"/>
+        <element name="Festival_event_image" positionX="-686" positionY="1143" width="128" height="88"/>
         <element name="Festival_offer" positionX="-342" positionY="962" width="128" height="208"/>
         <element name="Notification" positionX="-1098" positionY="803" width="128" height="223"/>
         <element name="People" positionX="-180" positionY="701" width="128" height="118"/>

+ 4 - 0
app/V2t.xcdatamodeld/V2t.xcdatamodel/contents

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="12141" systemVersion="16F73" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
+    <elements/>
+</model>

+ 1 - 1
app/app.xcdatamodeld/.xccurrentversion

@@ -3,6 +3,6 @@
 <plist version="1.0">
 <dict>
 	<key>_XCCurrentVersionName</key>
-	<string>app.xcdatamodel</string>
+	<string>app2.xcdatamodel</string>
 </dict>
 </plist>

+ 2 - 2
app/app.xcdatamodeld/app.xcdatamodel/contents

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="12141" systemVersion="16E195" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
+<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="12141" systemVersion="16F73" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
     <entity name="Activity" representedClassName=".Activity" syncable="YES" codeGenerationType="class">
         <attribute name="after_en" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="after_es" optional="YES" attributeType="String" syncable="YES"/>
@@ -241,6 +241,7 @@
         <element name="Festival_offer" positionX="18" positionY="-3879" width="128" height="195"/>
         <element name="Location" positionX="27" positionY="-3870" width="128" height="90"/>
         <element name="Notification" positionX="36" positionY="-3861" width="128" height="225"/>
+        <element name="People" positionX="-9" positionY="-3906" width="128" height="120"/>
         <element name="Photo" positionX="-9" positionY="-3906" width="128" height="285"/>
         <element name="Photo_album" positionX="0" positionY="-3897" width="128" height="75"/>
         <element name="Place" positionX="9" positionY="-3888" width="128" height="195"/>
@@ -250,6 +251,5 @@
         <element name="Post_tag" positionX="45" positionY="-3852" width="128" height="75"/>
         <element name="Sponsor" positionX="-9" positionY="-3906" width="128" height="255"/>
         <element name="Version" positionX="-9" positionY="-3906" width="128" height="75"/>
-        <element name="People" positionX="-9" positionY="-3906" width="128" height="120"/>
     </elements>
 </model>

+ 305 - 0
app/app.xcdatamodeld/app2.xcdatamodel/contents

@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="12141" systemVersion="16F73" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="V2">
+    <entity name="Activity" representedClassName=".Activity" syncable="YES" codeGenerationType="class">
+        <attribute name="after_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="after_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="after_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="album" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="city" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="comments" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dtime" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="inscription" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="max_people" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="people" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="permalink" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="price" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="text_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_eu" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Activity_comment" representedClassName=".Activity_comment" syncable="YES" codeGenerationType="class">
+        <attribute name="activity" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="dtime" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="lang" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="username" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Activity_image" representedClassName=".Activity_image" syncable="YES" codeGenerationType="class">
+        <attribute name="activity" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="idx" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="image" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Activity_itinerary" representedClassName=".Activity_itinerary" syncable="YES" codeGenerationType="class">
+        <attribute name="activity" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="description_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="description_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="description_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="end" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="name_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="place" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="route" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="start" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+    </entity>
+    <entity name="Activity_tag" representedClassName=".Activity_tag" syncable="YES" codeGenerationType="class">
+        <attribute name="activity" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="tag" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Album" representedClassName=".Album" syncable="YES" codeGenerationType="class">
+        <attribute name="description_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="description_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="description_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="open" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="permalink" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="time" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="title_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_eu" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Festival" representedClassName=".Festival" syncable="YES" codeGenerationType="class">
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="img" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="summary_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="summary_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="summary_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="year" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+    </entity>
+    <entity name="Festival_day" representedClassName=".Festival_day" syncable="YES" codeGenerationType="class">
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="max_people" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="name_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="people" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="price" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+    </entity>
+    <entity name="Festival_event_city" representedClassName=".Festival_event" syncable="YES" codeGenerationType="class">
+        <attribute name="day" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="description_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="description_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="description_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="end" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="host" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="place" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="route" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="sponsor" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="start" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="title_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_eu" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Festival_event_gm" representedClassName="Festival_event_gm" syncable="YES" codeGenerationType="class">
+        <attribute name="day" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="description_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="description_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="description_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="end" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="host" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="place" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="route" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="sponsor" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="start" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="title_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_eu" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Festival_event_image" representedClassName=".Festival_event_image" syncable="YES" codeGenerationType="class">
+        <attribute name="event" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="idx" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="image" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Festival_offer" representedClassName=".Festival_offer" syncable="YES" codeGenerationType="class">
+        <attribute name="days" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="description_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="description_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="description_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="name_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="price" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="year" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+    </entity>
+    <entity name="Location" representedClassName=".Location" syncable="YES" codeGenerationType="class">
+        <attribute name="dtime" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="lat" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="lon" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
+    </entity>
+    <entity name="Notification" representedClassName=".Notification" syncable="YES" codeGenerationType="class">
+        <attribute name="action" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="dtime" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="duration" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="gm" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="seen" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="text_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_eu" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="People" representedClassName="People" syncable="YES" codeGenerationType="class">
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="link" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_eu" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Photo" representedClassName=".Photo" syncable="YES" codeGenerationType="class">
+        <attribute name="description_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="description_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="description_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="dtime" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="file" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="height" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="permalink" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="place" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="size" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="title_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="uploaded" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="username" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="width" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+    </entity>
+    <entity name="Photo_album" representedClassName=".Photo_album" syncable="YES" codeGenerationType="class">
+        <attribute name="album" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="photo" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+    </entity>
+    <entity name="Photo_comment" representedClassName="Photo_comment" syncable="YES" codeGenerationType="class">
+        <attribute name="dtime" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="lang" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="photo" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="text" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="username" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Place" representedClassName=".Place" syncable="YES" codeGenerationType="class">
+        <attribute name="address_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="address_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="address_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="cp" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="lat" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="lon" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="name_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_eu" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Post" representedClassName=".Post" syncable="YES" codeGenerationType="class">
+        <attribute name="comments" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="dtime" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="permalink" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="title_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="username" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Post_comment" representedClassName=".Post_comment" syncable="YES" codeGenerationType="class">
+        <attribute name="dtime" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="lang" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="post" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="text" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="username" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Post_image" representedClassName=".Post_image" syncable="YES" codeGenerationType="class">
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="idx" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="image" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="post" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+    </entity>
+    <entity name="Post_tag" representedClassName=".Post_tag" syncable="YES" codeGenerationType="class">
+        <attribute name="post" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="tag" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Route" representedClassName="Route" syncable="YES" codeGenerationType="class">
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="mins" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="name" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Route_point" representedClassName="Route_point" syncable="YES" codeGenerationType="class">
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="lat_d" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="lat_o" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="lon_d" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="lon_o" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="part" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="place_d" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="place_o" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="route" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+    </entity>
+    <entity name="Sponsor" representedClassName=".Sponsor" syncable="YES" codeGenerationType="class">
+        <attribute name="address_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="address_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="address_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="image" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="lat" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="link" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="local" optional="YES" attributeType="Boolean" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="lon" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
+        <attribute name="name_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="name_eu" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_en" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_es" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="text_eu" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="Version" representedClassName=".Version" syncable="YES" codeGenerationType="class">
+        <attribute name="section" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="version" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
+    </entity>
+    <elements>
+        <element name="Activity" positionX="-56" positionY="-4059" width="128" height="345"/>
+        <element name="Activity_comment" positionX="-45" positionY="-3906" width="128" height="135"/>
+        <element name="Activity_image" positionX="-36" positionY="-3897" width="128" height="105"/>
+        <element name="Activity_itinerary" positionX="-18" positionY="-3888" width="128" height="225"/>
+        <element name="Activity_tag" positionX="0" positionY="-3852" width="128" height="75"/>
+        <element name="Album" positionX="18" positionY="-3861" width="128" height="195"/>
+        <element name="Festival" positionX="36" positionY="-3852" width="128" height="180"/>
+        <element name="Festival_day" positionX="-9" positionY="-3906" width="128" height="165"/>
+        <element name="Festival_event_city" positionX="-261" positionY="-3810" width="128" height="253"/>
+        <element name="Festival_event_image" positionX="9" positionY="-3888" width="128" height="105"/>
+        <element name="Festival_offer" positionX="18" positionY="-3879" width="128" height="195"/>
+        <element name="Location" positionX="27" positionY="-3870" width="128" height="90"/>
+        <element name="Notification" positionX="36" positionY="-3861" width="128" height="225"/>
+        <element name="People" positionX="-9" positionY="-3906" width="128" height="120"/>
+        <element name="Photo" positionX="-9" positionY="-3906" width="128" height="285"/>
+        <element name="Photo_album" positionX="0" positionY="-3897" width="128" height="75"/>
+        <element name="Place" positionX="9" positionY="-3888" width="128" height="195"/>
+        <element name="Post" positionX="18" positionY="-3879" width="128" height="210"/>
+        <element name="Post_comment" positionX="27" positionY="-3870" width="128" height="135"/>
+        <element name="Post_image" positionX="36" positionY="-3861" width="128" height="105"/>
+        <element name="Post_tag" positionX="45" positionY="-3852" width="128" height="75"/>
+        <element name="Sponsor" positionX="-9" positionY="-3906" width="128" height="270"/>
+        <element name="Version" positionX="-9" positionY="-3906" width="128" height="75"/>
+        <element name="Photo_comment" positionX="-9" positionY="-3906" width="128" height="135"/>
+        <element name="Route" positionX="0" positionY="-3897" width="128" height="90"/>
+        <element name="Route_point" positionX="9" positionY="-3888" width="128" height="180"/>
+        <element name="Festival_event_gm" positionX="-245" positionY="-4104" width="128" height="253"/>
+    </elements>
+</model>

+ 0 - 0
app/app.xcdatamodeld/app2.xcdatamodel/xcmapping.xml