Announcement Announcement Module
Collapse
No announcement yet.
Custom DAO access to generated DAO Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom DAO access to generated DAO

    I have a custom method on my DAO that is essentially findOrCreateByX().

    Code:
    public interface IFooDAO extends JpaRepository<Foo, Long>, IFooDAOCustom {
        Foo findByX(X x);
    }
    
    public IFooDAOcustom {
        Foo createByX(X x);
        Foo findOrCreateByX(X x);
    }
    How could I implement FooDAOCustomImpl such that I use the generated findByX? I can't exactly inject something of IFooDAO, as that's circular. Or is there no way, and I should just inject entity manager and deal with it that way?

    thanks for the help
    Jeff
Working...
X