Skip to content
Advertisement

Tag: playframework

If we can directly do action composition using @With annotation then why do we need to create custom annotations using interfaces?

When we are using Play Framework Action Composition we can directly use the @With annotation, as explained here. Alternatively, we can define custom action annotations. But what are the advantages of defining your own annotations? It’s like we are just adding a middle-man (interface). And one more doubt: while implementing the action class we use generics to specify a corresponding

Play framework, Different constraints for different requests

How to implement different constraints for different requests? For example, there is User class: When I create a new user, all constraints are required. But when I update user information, I don’t need the password constraint. Should I create separate classes for createUser() and updateUser() actions? Is there any way I can use just one class? Answer As Play’s validation

Add the play script to your PATH in Mac

I’m not good with the terminal, so I have no idea what this means…. you should add the framework installation directory to your system PATH. On UNIX systems, this means doing something like: On Windows you’ll need to set it in the global environment variables. This means update the PATH in the environment variables and don’t use a path with

How can I cascade delete a collection which is part of a JPA entity?

In one of my jobs I have the following code: This always fails to delete the entity with the following error: The DELETE statement conflicted with the REFERENCE constraint “FK966F0D9A66DB1E54”. The conflict occurred in database “TFADB”, table “dbo.MonthlyReport_categories”, column ‘MonthlyReport_id’. How can I specify the mapping so the elements from the categories collection get deleted when the report is deleted?

Advertisement