{"@context":"https://w3id.org/codemeta/3.0","@type":"SoftwareSourceCode","identifier":"pkg:golang/github.com/ewhal/mongodm","name":"github.com/ewhal/mongodm","description":"This package is an object document mapper for mongodb which uses the mgo adapter.\n\nFirst step is to create a model, for example:\n\nIt is important that each schema embeds the IDocumentBase type (mongodm.DocumentBase) and make sure that it is tagged as 'inline' for json and bson.\nThis base type also includes the default values id, createdAt, updatedAt and deleted. Those values are set automatically from the ODM.\nThe given example also uses a relation (User has Messages). Relations must always be from type interface{} for storing bson.ObjectId OR a completely\npopulated object. And of course we also need the related model for each stored message:\n\nNote that when you are using relations, each model will be stored in his own collection. So the values are not embedded and instead stored as object ID\nor array of object ID's.\n\nTo configure a relation the ODM understands three more tags:\n\nBut it is not necessary to always create relations - you also can use embedded types:\n\nPersisting a customer instance to the database would result in embedding an complete address object. You can embed all supported types.\n\nNow that you got some models it is important to create a connection to the database and to register these models for the ODM.","version":"v2.0.1+incompatible","softwareVersion":"v2.0.1+incompatible","license":"https://spdx.org/licenses/GPL-2.0","codeRepository":"https://github.com/ewhal/mongodm","issueTracker":"https://github.com/ewhal/mongodm/issues","url":"https://github.com/ewhal/mongodm","programmingLanguage":{"@type":"ComputerLanguage","name":"Go"},"dateCreated":"2016-04-15","dateModified":"2018-02-11","datePublished":"2018-02-11","copyrightYear":2016,"downloadUrl":"https://proxy.golang.org/github.com/ewhal/mongodm/@v/v2.0.1+incompatible.zip","softwareHelp":{"@type":"WebSite","url":"https://pkg.go.dev/github.com/ewhal/mongodm#section-documentation"},"applicationCategory":"go","runtimePlatform":"go","developmentStatus":"active","sameAs":["https://pkg.go.dev/github.com/ewhal/mongodm"]}