emacarron / mybatis

Automatically exported from code.google.com/p/mybatis
0 stars 0 forks source link

@ReuseAnnotation for methods #137

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The wishfull @ReuseAnnotation would allow one to specify a method and which 
annotations to reuse.

Example

@Select("select * from x where id = #{id}")
@Results({
  @Result(),
  @Result(),
  @Result(),
  @Result(),
  @Result()
})
Object getById(Long id)

@Select("select * from x where date < now()")
@ReuseAnnotation( value = "getById", results = true, args = true, 
discriminators = true)
Object getFromThePast(Date date)

Makes Annotated results (almost) as reusable as xml resultmaps.

Original issue reported on code.google.com by jaron.schut@gmail.com on 9 Oct 2010 at 6:57

GoogleCodeExporter commented 9 years ago

Original comment by nathan.m...@gmail.com on 14 Sep 2011 at 6:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by eduardo.macarron on 10 Jun 2012 at 2:39