lc-spring-data-r2dbc-sample's People
lc-spring-data-r2dbc-sample's Issues
StackOverflowError when I try to start app
Hi! I have application with entities which have OneToOne and ManyToMany relations.
I marked it how into the docs
(For example)
@ForeignKey(onForeignDeleted = ForeignKey.OnForeignDeleted.SET_TO_NULL)
private ClientEntity client;
@ForeignKey(onForeignDeleted = ForeignKey.OnForeignDeleted.SET_TO_NULL)
private TenantEntity tenant;
@JoinTable(joinProperty = "imageEntities", columnName = "object_id", tableName = "rel_object_image")
private Set<ObjectEntity> objectEntities = new HashSet<>();
Many to Many relation in other entity
@jointable(joinProperty = "objectEntities", columnName = "image_id", tableName = "rel_object_image")
private Set imageEntities = new HashSet<>();
Also i have lazy init methods
and on the main class
@EnableR2dbcRepositories(repositoryFactoryBeanClass = LcR2dbcRepositoryFactoryBean.class, basePackages = "some.package.entity")
and LcReactiveDataRelationalInitializer.init(); in main method.
Also i have lc-reactive-data-relational.yaml file with relation which app scans after starting
and I have error
2023-10-18T16:56:51.117 [main] INFO n.l.r.d.relational.enhance.Enhancer.enhanceClasses - Enhancing 5 entity classe(s)
2023-10-18T16:56:51.155 [main] INFO n.l.r.d.relational.enhance.Enhancer.createJoinTable - Create join table class ru.mts.iot.core.repoimgsrv.entity.JoinEntity_ImageEntity_ObjectEntity with table name rel_object_image
2023-10-18T16:56:51.227 [main] INFO n.l.r.d.relational.enhance.Enhancer.enhanceClasses - 6 class(es) enhanced
Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'imageRepository' defined in ru.mts.iot.core.repoimgsrv.repository.ImageRepository defined in @EnableR2dbcRepositories declared on R2dbcRepositoriesAutoConfigureRegistrar.EnableR2dbcRepositoriesConfiguration: Invocation of init method failed; nested exception is java.lang.StackOverflowError
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292)
I think cause is with relations. Can you help me please? :)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.