gorm-standalone | Using GORM outside Grails in a Spring application | Object-Relational Mapping library
kandi X-RAY | gorm-standalone Summary
kandi X-RAY | gorm-standalone Summary
This project is for using GORM outside a Grails application. The GORM version is 2.0.3 for Hibernate.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Parse the bean definition
- Parses a session factory element
- Parse Grails application
- Creates the domain bean
- Creates a bean definition scanner
- Lookup the configuration class
- Initialize the parser
gorm-standalone Key Features
gorm-standalone Examples and Code Snippets
Community Discussions
Trending Discussions on gorm-standalone
QUESTION
I have a Micronaut project configured to use GORM and Groovy (1). This project contains lots of domain classes that are working perfectly, persisting data in a MySQL database as expected.
Now I wish to make this domain classes common to another Micronaut project (2).
I tried building a JAR file containing only the domain package and including it in the project (2) through build.gradle
. The classes are compiled and made accessible in code, and I'm able to call GORM methods like findBy
, createCriteria
, etc. Is also good to mention that all project 2's domain classes are annotated with @Entity
.
But, when I run the project (using IntelliJ idea) and hit some of this code I get:
...ANSWER
Answered 2018-Dec-05 at 10:17I'm using a similar setup.
I have a core-lib with GORM-standalone, and couple of (Vert.x) verticles and Grails apps using those via gradle's compile project()
or compile dep:from-artifactory:0.1-SNAPSHOT
directives.
In order to make it possible I needed to:
1) Make sure that each domain class is annotated with grails.gorm.annotation.Entity
2) Tweak Grails' Application.groovy
like that:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gorm-standalone
You can use gorm-standalone like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the gorm-standalone component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page