-
Notifications
You must be signed in to change notification settings - Fork 12
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
Entity Unknown Error #11
Comments
Do you have the init line in your main ? LcReactiveDataRelationalInitializer.init(); |
Yes, I have. Below is the application class.
|
This is the startup console log from the app run. It gives information that the lc-spring-data-r2dbc found 7 entity classes but when the repository method is called, why the lc-spring-data-r2dbc can't recognise it?
Below is the repository.
|
It may come from the Spring devtools restart feature, can you try to disable it and check if it works without it ? |
Wait for me to disable it. |
New error after disabling spring dev tools dependency.
|
Looks like a dependency version conflict, can you try to put the dependency io.r2dbc:r2dbc-spi:0.9.1.RELEASE at the top of your dependencies ? <dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-spi</artifactId>
<version>0.9.1.RELEASE</version>
</dependency> |
ok, the error is fixed now. how do you know the problem is dependency conflict? and, why classloaders from spring dev tools could make this lc-spring-data-r2dbc dependency not work as normal? |
I will fix the version conflict by adding the version in the dependency management, because currently spring data depends on the previous r2dbc-spi version (0.8) while we already upgraded our drivers to the latest 0.9.1.RELEASE. Regarding the spring devtools, it does not work because lc-spring-data-r2dbc needs to enhance entity classes at startup, but the devtools reload the original class in a different ClassLoader. I will have a look how we can support it. |
Thanks for the explanation! I hope the new fixes and features got contributed :D |
The new release 0.10.1 should fix the 2 issues. |
Already upgraded to 0.10.1 but still need to specify |
net.lecousin.reactive.data.relational.model.ModelAccessException: Unknown entity type
I have that error even though I already annotated the entity class with
@Table(value="table_name")
and entity class property with@Column(value="column_name")
to be recognized as entity. Why the entity is didn't recognized by lc-spring-data-r2dbc? Can anyone help me to solve this problem? Thanks in advance!Below is the entity.
Below is the complete stack trace.
The text was updated successfully, but these errors were encountered: