If it was persistent it would be rather easy to add your own type as
described in Developer's Guide.
Now it is not, and then I think the easiest is to wrap it inside a not
persistent ValueObject like this:
Entity Person {
- @UserInformationWrapper userInfo
}
ValueObject UserInformationWrapper {
not persistent
com.foo.common.UserInformation value
}
An alternative is to use it as you suggested. To get rid of the error you
have to add
db.mysql.type.com.foo.common.UserInformation=VARCHAR
in your sculptor-generator.properties
But then you also have to do some special cases to exclude it from from
hibernate and ddl generation.
/Patrik
PS. wiki is down, and I don't know why. You have checked out from svn and
can read documentation in
/fornax-cartridges-sculptor-parent/doc/AdvancedTutorial.pdf
amphoras wrote:
>
> Hi,
>
> I want to have a domain object that references another class that is:
>
> 1. Not known to Sculptor.
> 2. Does not need to be persisted.
> 3. Inside a jar.
>
> I know I can put this reference in the hand-coded subclass, but I'd like
> to map other properties to it (I will extend the DSL) and generate its
> getter/setter. How do I create this reference in model.design? I tried:
>
> com.foo.common.UserInformation userInfo
>
> Which passes validation and even generates correctly in the Base class
> with an import statement (very cool!), but it throws this exception during
> generation:
>
> ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component
> generator of type org.openarchitectureware.xpand2.Generator:
> EvaluationException : java.util.MissingResourceException: Property not
> found: db.mysql.type.com.foo.common.UserInformation
>
> How do I tell Sculptor to not persist this class? I tried "!persistent"
> for the reference, but it doesn't work.
>
> Thanks!
> --Polly
>
--
View this message in context:
http://www.nabble.com/-Sculptor--Reference-class-in-jar-tp18119720s17564p18120542.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer