wangscript / warp-persist

Automatically exported from code.google.com/p/warp-persist
0 stars 0 forks source link

[PATCH] Mutators for warp-persist. #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Mutators will allow batch DML operations via the Dynamic Finders facility
in warp.

In any location where you might be able to apply a @Finder, you should be
able to apply a @Mutator with a delete or update operation :

@Transactional
@Mutator("update MyEntity me set me.employeeClass = :class where me.salary
> :salary")
int updateClassBasedOnSalary(@Named("class") String employeeClass,
@Named("salary") Double salary);

Please note that the @Transactional attribute may need to be present based
on how your transactional functionality is set up.

Also, the return value is pre-determined (usually an int ) based on the
executeUpdate semantics of both Hibernate and JPA.

Original issue reported on code.google.com by aadi.des...@gmail.com on 23 Oct 2007 at 2:10

Attachments:

GoogleCodeExporter commented 9 years ago
As noted in my group post, some of the changes in this patch are naming changes 
to be
more generic, such as moving FinderDescriptor to MethodDescriptor, and changing
variable names similarly. ( I think that's the only one )

Original comment by aadi.des...@gmail.com on 23 Oct 2007 at 2:15

GoogleCodeExporter commented 9 years ago
Are there any tests that cover this?

Original comment by dha...@gmail.com on 2 Mar 2008 at 6:28

GoogleCodeExporter commented 9 years ago
it's been a little while, but I'm pretty sure I added to your test suite to try 
this out.

Let me recheck and reup ( and sync up the code with trunk ).

Original comment by aadi.des...@gmail.com on 3 Mar 2008 at 4:39

GoogleCodeExporter commented 9 years ago
If there is no interest in this issue I'd like to close it out?

Original comment by dha...@gmail.com on 17 Apr 2008 at 9:05

GoogleCodeExporter commented 9 years ago
yes, go ahead. sorry for the lack of follow-up

Original comment by aadi.des...@gmail.com on 17 Apr 2008 at 4:39

GoogleCodeExporter commented 9 years ago

Original comment by dha...@gmail.com on 26 Aug 2008 at 2:14