Generate POJOs for Spring framework
curious-odd-man opened this issue · comments
These two annotations needs to be used:
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.data.relational.core.mapping.Table;
@Table("my_cool_table")
public class MyCoolTable{
@Column("column_in_a_table")
private String columnInATable;
}
Hi @curious-odd-man, I prefer to keep the plugin free of dependencies and stay with the JPA standard, sorry.
Hello @Jukien. What kind of dependencies are you talking about? There just another text should be generated in a Java file. I don't see any required dependencies. It is similar to #21 issue.
Actually I could implement it myself and then create a pull request. Just having troubles with importing project.
@curious-odd-man the imports you are talking are from Spring. Users will need to have the right Spring dependencies for make it work when files will be generated.
I use @Entity
and @Table
annotations from JPA (javax.persistence) which Spring is based on.
True. But then it is up to user to handle. I mean if user wants to use spring and wants to generate objects for spring he will need the dependencies. For example I needed to generate entities for JPA and then put imports and adapt code manually.