Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #747 - OTrackedMap returned for contents of data file #757

Merged
merged 2 commits into from
May 30, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions jbake-core/src/main/java/org/jbake/app/ContentStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
import com.orientechnologies.orient.core.metadata.schema.OClass;
import com.orientechnologies.orient.core.metadata.schema.OSchema;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.record.OElement;
import com.orientechnologies.orient.core.sql.executor.OResultSet;
import com.orientechnologies.orient.core.sql.query.OSQLSynchQuery;
import org.jbake.launcher.SystemExit;
import org.jbake.model.DocumentModel;
import org.jbake.model.DocumentTypes;
import org.jbake.model.ModelAttributes;
Expand Down Expand Up @@ -408,9 +406,9 @@ public boolean isActive() {
}

public void addDocument(DocumentModel document) {
ODocument doc = new ODocument(Schema.DOCUMENTS);
doc.fromMap(document);
doc.save();
OElement element = db.newElement(Schema.DOCUMENTS);
document.forEach((k, v) -> element.setProperty(k, v, OType.ANY));
element.save();
}

protected abstract class Schema {
Expand Down