emacarron / mybatis

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

Lazy loading proxies should support non-default constructors #145

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the MyBatis are you using?
3.0.2

Please describe the problem.  Unit tests are best!
Currently, my POJO classes do not have default constructors so I can enforce 
invariants (like all names must be non-null, etc). However, if I want to use 
lazy loading, the current method MyBatis uses to enhance mappers with CGLIB 
proxies requires a default no-arg constructor.

What is the expected output? What do you see instead?
I would like to be able to somehow specify the constructor args to CGLIB for my 
mapper POJO classes. Ideally, this could just be read from the mapper xml file 
where constructor args are already specified in the result map

Original issue reported on code.google.com by hpresnall@gmail.com on 16 Oct 2010 at 9:27

GoogleCodeExporter commented 9 years ago

Original comment by eduardo.macarron on 15 Dec 2010 at 6:59