Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
static get modelName() {
return 'Comment';
}
static get options() {
return {
idAttribute: 'id'
};
}
}
/* Schema ==================================================================== */
const schema = new ORM();
schema.register(Post, Comment);
/* Export Schema ==================================================================== */
export default schema;
}
static get modelName() {
return 'Notification';
}
static get options() {
return {
idAttribute: 'id'
};
}
}
/* Schema ==================================================================== */
const schema = new ORM();
schema.register(Notification);
/* Export Schema ==================================================================== */
export default schema;
}
static get modelName() {
return 'Conversation';
}
static get options() {
return {
idAttribute: 'id'
};
}
}
/* Schema ==================================================================== */
const schema = new ORM();
schema.register(Message, Conversation);
/* Export Schema ==================================================================== */
export default schema;
import '../test-helper/testUtils'
import { expect } from 'chai'
import { ORM } from 'redux-orm'
import ReduxORMAdapter from '../../src/adapters/ReduxORMAdapter'
import DummyReduxORMModel from '../test-helper/DummyReduxORMModel'
import asyncFunction from '../test-helper/asyncFunction'
const orm = new ORM()
orm.register(DummyReduxORMModel)
const session = orm.session()
describe('ReduxORMAdapter', () => {
const adapter = new ReduxORMAdapter(session)
it('can be created', () => {
expect(adapter).to.be.an.instanceof(ReduxORMAdapter)
})
describe('#build', () => {
it(
'builds the model',
asyncFunction(async () => {
const model = adapter.build('DummyReduxORMModel', {
id: 1,
type: 'City',
name: 'Vic',
import { ORM } from 'redux-orm';
import {
Action,
Board,
Card,
Label,
List,
Notification,
Project,
ProjectMembership,
Task,
User,
} from './models';
const orm = new ORM({
stateSelector: (state) => state.orm,
});
orm.register(
User,
Project,
ProjectMembership,
Board,
List,
Label,
Card,
Task,
Action,
Notification,
);
import {ORM } from "redux-orm";
import Pilot from "features/pilots/Pilot";
import MechDesign from "features/mechs/MechDesign";
import Mech from "features/mechs/Mech";
import Unit from "features/unitInfo/Unit";
import Faction from "features/unitInfo/Faction";
const orm = new ORM();
orm.register(Pilot, MechDesign, Mech, Unit, Faction);
export default orm;
import {ORM} from 'redux-orm';
import Language from './language';
import Link from './link';
import Parameter from './parameter';
import Port from './port';
import Sticky from './sticky';
import Node from './node';
const orm = new ORM();
orm.register(Language, Link, Parameter, Port, Node, Sticky);
export default orm;
import {ORM} from "redux-orm";
import Mech from "features/mechs/Mech";
import MechDesign from "features/mechs/MechDesign";
import Pilot from "features/pilots/Pilot";
const orm = new ORM();
orm.register(Mech, MechDesign, Pilot);
export default orm;
import { ORM } from 'redux-orm';
import Link from './models/link';
import Node from './models/node';
import Port from './models/port';
const orm = new ORM();
orm.register(Link, Node, Port);
export default orm;
import { ORM } from 'redux-orm';
import Division from './division';
import DivisionLevel from './divisionLevel';
import Office from './office';
import Officeholder from './officeholder';
import Party from './party';
import Person from './person';
const orm = new ORM();
orm.register(
Division,
DivisionLevel,
Office,
Officeholder,
Party,
Person
);
export default orm;