| [Texo] No Dao class is generated for abstract class [message #869158] |
Wed, 02 May 2012 22:35  |
Oliver Zhou Messages: 32 Registered: February 2012 |
Member |
|
|
Hi Martin,
Recently I noticed that dao class is not generated for abstract class.
I don't know why. To me, such dao classes should be generated because it is allowed to pass a abstract class to EntityManager.find to get all the instances of one class hierarchy.
What do you think?
|
|
|
|
| Re: [Texo] No Dao class is generated for abstract class [message #869953 is a reply to message #869329] |
Sat, 05 May 2012 01:23   |
Martin Taal Messages: 5049 Registered: July 2009 |
Senior Member |
|
|
Hi Oliver,
I published a new build.
gr. Martin
On 05/03/2012 10:32 AM, Martin Taal wrote:
> Hi Oliver,
> Yes makes sense what you say. I changed it and am doing a new build. Will post here after I published it.
>
> gr. Martin
>
> On 05/03/2012 04:35 AM, Oliver Zhou wrote:
>> Hi Martin,
>>
>> Recently I noticed that dao class is not generated for abstract class.
>> I don't know why. To me, such dao classes should be generated because it is allowed to pass a abstract class to
>> EntityManager.find to get all the instances of one class hierarchy.
>>
>> What do you think?
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
| Re: [Texo] No Dao class is generated for abstract class [message #870130 is a reply to message #869990] |
Sun, 06 May 2012 17:04   |
Martin Taal Messages: 5049 Registered: July 2009 |
Senior Member |
|
|
Hi Oliver,
Yes you are right, I am developing some other features so I don't have a working (local) build at the moment, but will
rebuild asap, will be a few days probably..
gr. Martin
On 05/05/2012 05:05 PM, Oliver Zhou wrote:
> Hi Martin,
>
> Thanks for fix, I tested the build, but it seems the problem still exists.
> I debugged into the code and I found maybe the following logic in ModelEClassAnnotator.setAnnotationFeatures causes the
> problem:
>
> if (!GenUtils.isDocumentRoot(eClass) && !eClass.isInterface() && !eClass.isAbstract() && !ModelUtils.isEMap(eClass)
> && GeneratorUtils.isEmptyOrNull(annotation.getDaoQualifiedClassName())) {
> final EPackageModelGenAnnotation ePackageModelGenAnnotation = getEPackageModelGenAnnotation(eClass.getEPackage());
> final String packagePath = ePackageModelGenAnnotation.getDaoClassesPackagePath();
> annotation.setDaoQualifiedClassName(packagePath + GenConstants.DOT + annotation.getSimpleClassName()
> + getDaoPatternName(ePackageModelGenAnnotation));
> } else {
> // prevent dao generation
> annotation.setDaoQualifiedClassName(null);
> }
>
> Could you verify it again?
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
|
|
| Re: [Texo] No Dao class is generated for abstract class [message #870296 is a reply to message #870281] |
Mon, 07 May 2012 11:16  |
Martin Taal Messages: 5049 Registered: July 2009 |
Senior Member |
|
|
Hi Oliver,
I published a new build which should solve the dao issue you reported here.
gr. Martin
On 05/07/2012 04:51 PM, Martin Taal wrote:
> Hi Oliver,
> The past weeks I added a JSON webservice layer:
> http://wiki.eclipse.org/Texo/JSON_REST_Web_Services
> http://martintaal.wordpress.com/2012/04/05/emf-texo-json-rest-web-service-support-connecting-your-client-to-an-emf-supporting-web-server/
>
>
> I am now working on support for EMF Resources. This makes it possible to develop RCP's on top of Texo generated jpa
> entities. I have developed an EMF resource which uses JPA to persist/query the database. This supports 2-tier architect
> where the RCP talks directly to the database. My next step is to develop an EMF resource which talks json with a backend
> web server. This combines the work I for the JSON webservice layer. So then you can have a 3-tier architecture: RCP -
> [json] - webserver - database
>
> Then after that I will develop a RIA/html5 user interface which will work with the JSON web service layer.
>
> A smaller thing I added is that it is possible to generate the code in another project (see the texo project
> properties). This will be available after I get a new build done...
>
> gr. Martin
>
> On 05/07/2012 04:29 PM, Oliver Zhou wrote:
>> No problem!
>> I can wait.
>>
>> By the way, which exciting feature are you developing? :p
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.02519 seconds