hakandilek / play2-crud

Simple CRUD & DAO implementation for play2
Other
142 stars 52 forks source link

Issue54 #56

Open ianrae opened 9 years ago

ianrae commented 9 years ago

Hi @hakandilek. Here are two projects: twixt54 is a play module,and m8 is a play app.

Steps -build and publish-local twixt54 -build m8 Both these projects have play2-crud as a dependency

The key line is in m8 TaxiController.java.

public class TaxiController extends MyDynamicTwixtController<Long, Taxi, TaxiTwixt>

When the controller is derived from the local class MyDynamicTwixtController, everything works fine and the ClasspathScanningControllerRegistry sees TaxiController:

[debug] p.u.m.c.ClasspathScanningControllerRegistry - pqpcontrollerClass : class controllers.TaxiController

But when TaxiController is changed to derive from DynamicTwixtController (in twixt54), then ClasspathScanningControllerRegistry does not see TaxiController. I am no longer seeing an exception, but play2-crud simply ignores TaxiController and generates its own. This is incorrect; it should see that TaxiController is a crud controller for the Taxi model.