mysql - Can a Spring boot Hibernate Entity call a repository -
i have entity transient property so:
@entity public class testtool implements java.io.serializable { private long id; @transient private long timesaving;
i want getter make call repository of different entity. need call 2 repositories.
public long gettimesaving() {}
one repository has 1 many relationship different kind of entity. want total timesaving of related testcase entities , add them in total timesaving value testtool entity.
@entity public class testsuite { @id @generatedvalue(strategy = generationtype.identity) private long id; @manytoone private testtool testtool; @manytoone private testcase testcase; @entity public class testcase implements java.io.serializable { @id @generatedvalue(strategy = generationtype.identity) private long id; private long timesaving;
Comments
Post a Comment