Reverted database id property removal.

This commit is contained in:
Christine Emrich 2015-11-18 20:59:48 +01:00
parent f4b8248a91
commit 6016cc7dc6

View file

@ -31,14 +31,17 @@ public class Version4 extends SchemaVersion {
return 4;
}
@SuppressWarnings("unused") // id properties (folderId, etc.) need to be in database
private static void addEntitysToSchema(Schema schema) {
/* Folder */
Entity folder = schema.addEntity("Folder");
Property folderId = folder.addIdProperty().notNull().getProperty();
folder.addStringProperty("label").notNull();
/* Feed */
Entity feed = schema.addEntity("Feed");
Property feedId = feed.addIdProperty().notNull().getProperty();
Property folderIdProperty = feed.addLongProperty("folderId").index().getProperty();
feed.addStringProperty("feedTitle").notNull();
@ -50,6 +53,7 @@ public class Version4 extends SchemaVersion {
/* RSS Item */
Entity rssItem = schema.addEntity("RssItem");
Property rssItemId = rssItem.addIdProperty().notNull().getProperty();
Property rssItemFeedId = rssItem.addLongProperty("feedId").notNull().index().getProperty();
rssItem.addStringProperty("link");