-
Notifications
You must be signed in to change notification settings - Fork 197
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
Repository always needs an ID column #32
Comments
I cannot reproduce this. See 8242b56 Does your |
@graemerocher thank you for the response and you were spot on. i was using @DaTa annotation from Lombok, But when i added the Getter and Setter manually, the Repo is working. but unfortunately, with lombok @DaTa it's not working.
Model:
|
I have exactly same problem as described @Bonythomasv |
Most likely an interaction issue but Micronaut and Lombok. Ensure the Lombok processor is declared first |
Do you mean annotation on Entity class, or order of annotation processor at the gradle file? |
In the build gradle file |
I am seeing the same issue when using a Kotlin data class:
|
Same here, got a Cannot query on ID with entity that has no ID error when using |
@tdudouet @gavintranter I believe this is because the |
@graemerocher Same bug moving from |
@graemerocher I would love to test this but so far I am having issues with the runtime not find the repository methods, including That said using the following entity the runtime does appear to build the table. I dont think it is setting the id column as an id in postgres, it would be nice if it set the uniqueness constraint, but I dont know if I would consider this an issue as such.
|
Do you have an example of what is not working for you? |
Sure:
The exception is:
Just in case its useful my gradle dependencies
Using Thanks |
Seems updating to Micronaut 1.2.0 and the (As an added bonus it pulled in the fix for the bug I raised re bit/boolean field) Thank you for your help, cant wait for this to go GA, I have been very impressed with Micronaut. |
I have exactly same problem as described @Bonythomasv on micronaut 1.2.6 |
I have run into this problem with the latest released versions of micronaut with kotlin and have found that you currently need to add |
I have not tested thoroughly but from my previous initial observation, some of the annotations are not being read properly at compile time of the field site target is missing. |
I'm getting the following error while running a simple query with Predator JDBC and Postgress
error: Unable to implement Repository method: TaskRepository.findById(Object arg0). Cannot query entity [Task] on non-existent property: id error: Unable to implement Repository method: TaskRepository.existsById(Object arg0). Cannot query entity [Task] on non-existent property: id error: Unable to implement Repository method: TaskRepository.deleteById(Object arg0). Cannot query entity [Task] on non-existent property: id error: Unable to implement Repository method: TaskRepository.delete(Object arg0). Delete all not supported for entities with no ID error: Unable to implement Repository method: TaskRepository.delete(Object arg0). No possible implementations found.
Here is my Entity Class:
`
@entity
@DaTa
@NoArgsConstructor
//@MappedEntity(namingStrategy = NamingStrategies.Raw.class)
public class Task implements Serializable {
}`
Repositiry class:
` @JdbcRepository(dialect = Dialect.POSTGRES)
public abstract class TaskRepository implements CrudRepository<Task, Long> {
} `
but if the table has the column name
id
then it works fine.The text was updated successfully, but these errors were encountered: