Fornax-Platform
Forum

Generator bug with entity namespace in AccessFactory?

View: New views
4 Messages — Rating Filter:   Alert me  

Generator bug with entity namespace in AccessFactory?

by Jef Pfeiffer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Generator bug with entity namespace in AccessFactory? Given DSL like this:

Entity Foo
{
    package=domain.bar
    Repository FooRepository
    {
        save;
        merge;
        delete;
    }
}

And sculptor-generator.properties that override the default packages, such as this:

package.serviceInterface=service.api package.serviceImplementation=service.impl package.serviceProxy=service.proxy package.exception=domain.api.exception package.repositoryInterface=repository.api package.repositoryImplementation=repository.impl package.accessInterface=repository.access.api package.accessImplementation=repository.access.impl


It seems that the generated FooAccessFactory class doesn’t create the correct import for the Foo class.  It imports “domain.Foo”, rather than “domain.bar.Foo”.

More specifically, the abstract access methods are correct (they use fully qualified references to Foo), but the getPersistentClass() implementation is incorrect (it relies on the import statement).

Please advise (it could certainly be my configurations that result in this).

Also, there is a workaround if I also set “packages.domain=domain.bar” in the sculptor-generator.properties file (but I’d rather not since I want to define the package on the Entity itself).

Thanks!

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Generator bug with entity namespace in AccessFactory?

by Patrik Nordwall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It is a bug. Thanks for reporting.
I have created jira issue: http://fornax.itemis.de/jira/browse/CSC-403
I have fixed it in trunk.
Read comment in CSC-403 if you need a patch for 1.6.0.

/Patrik


Jef Pfeiffer wrote:
Given DSL like this:

Entity Foo
{
    package=domain.bar
    Repository FooRepository
    {
        save;
        merge;
        delete;
    }
}

And sculptor-generator.properties that override the default packages, such
as this:

package.serviceInterface=service.api
package.serviceImplementation=service.impl
package.serviceProxy=service.proxy package.exception=domain.api.exception
package.repositoryInterface=repository.api
package.repositoryImplementation=repository.impl
package.accessInterface=repository.access.api
package.accessImplementation=repository.access.impl


It seems that the generated FooAccessFactory class doesn¹t create the
correct import for the Foo class.  It imports ³domain.Foo², rather than
³domain.bar.Foo².

More specifically, the abstract access methods are correct (they use fully
qualified references to Foo), but the getPersistentClass() implementation is
incorrect (it relies on the import statement).

Please advise (it could certainly be my configurations that result in this).

Also, there is a workaround if I also set ³packages.domain=domain.bar² in
the sculptor-generator.properties file (but I¹d rather not since I want to
define the package on the Entity itself).

Thanks!

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Generator bug with entity namespace in AccessFactory?

by Jef Pfeiffer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Fornax-developer] Generator bug with entity namespace in AccessFactory? Thanks for the quick reply, Patrik.

BTW – I was under the impression there was work done to generate SOAP (@WebService) interfaces for the services, but I can’t seem to find references to it.

Do you know where I might look?


On 9/9/09 1:58 PM, "Patrik Nordwall" <patrik.nordwall@...> wrote:



It is a bug. Thanks for reporting.
I have created jira issue: http://fornax.itemis.de/jira/browse/CSC-403
I have fixed it in trunk.
Read comment in CSC-403 if you need a patch for 1.6.0.

/Patrik



Jef Pfeiffer wrote:
>
> Given DSL like this:
>
> Entity Foo
> {
>     package=domain.bar
>     Repository FooRepository
>     {
>         save;
>         merge;
>         delete;
>     }
> }
>
> And sculptor-generator.properties that override the default packages, such
> as this:
>
> package.serviceInterface=service.api
> package.serviceImplementation=service.impl
> package.serviceProxy=service.proxy package.exception=domain.api.exception
> package.repositoryInterface=repository.api
> package.repositoryImplementation=repository.impl
> package.accessInterface=repository.access.api
> package.accessImplementation=repository.access.impl
>
>
> It seems that the generated FooAccessFactory class doesn¹t create the
> correct import for the Foo class.  It imports ³domain.Foo², rather than
> ³domain.bar.Foo².
>
> More specifically, the abstract access methods are correct (they use fully
> qualified references to Foo), but the getPersistentClass() implementation
> is
> incorrect (it relies on the import statement).
>
> Please advise (it could certainly be my configurations that result in
> this).
>
> Also, there is a workaround if I also set ³packages.domain=domain.bar² in
> the sculptor-generator.properties file (but I¹d rather not since I want to
> define the package on the Entity itself).
>
> Thanks!
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@...
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>
>

--
View this message in context: http://www.nabble.com/Generator-bug-with-entity-namespace-in-AccessFactory--tp25370111s17564p25371292.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@...
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Re: Generator bug with entity namespace in AccessFactory?

by Patrik Nordwall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, I'm working on WebServices and DataTransferObjects with JAXB annotations.
I haven't updated documentation yet.

You can try it if you use version 1.7.0-SNAPSHOT.
Let me know if you have suggestions for improvements.

The DSL editor plugin for 1.7.0 can be downloaded from
http://fornax.itemis.de/confluence/download/attachments/1138/sculptor-update-site-1.7.0-SNAPSHOT.zip

Simple example:

                Service FooService {
                        webservice
                        doSomethingWith(@FooDto foo);
                }
               
                DataTransferObject FooDto {
                        String attr1
                        String attr2 required
                        String attr3 nullable
                }

/Patrik



Jef Pfeiffer wrote:
Thanks for the quick reply, Patrik.

BTW ­ I was under the impression there was work done to generate SOAP
(@WebService) interfaces for the services, but I can’t seem to find
references to it.

Do you know where I might look?