Search code examples
javamysqlgoentityspring-data-jpa

Framework similar to Spring Data JPA in Golang


Do you know some frameworks written in Golang similar to Spring Data JPA? I am looking for something which allow me to easy work between Golang structs and MySQL database tables. I was looking for it in Google, not found. Cheers.


Solution

  • GORM is the most popular ORM for golang. However featurewise it is not even close to JPA or spring-data-jpa. There are also many gotchas you will have to manage in order to produce a good solution using GORM. There are many other ORMs, none coming close to spring-data-jpa.

    The advised solution will depend on whether simple queries will be sufficient for you. If you have to write more complex queries, the best way would be to use sqlx for that.