cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Missing DbAttribute
Date Thu, 27 Jul 2006 13:39:00 GMT
Hi,

> Under Foo2 -> Attribute, the DbAttribute is blank for all the  Foo2  
> own
> attributes.

...

> I am writting my own singleclass.vm template, and the absence of Foo2
> DbAttributes mean that I cannot access the dbAttribute methods such as
> MaxLength(), Name() etc.

I am a bit confused - you do not want to map DbAttributes for certain  
object attributes, but then later you want to access them? Could you  
explain?

> @javax.persistence.Column(name = "${dbAttr.Name}",

Woa! you are building some JPA annotations. Care to elaborate how you  
were planning to do with those? :-)

Andrus



On Jul 27, 2006, at 4:04 AM, cay dabbler wrote:

>
> 1. I have two classes Foo1 and Foo2;
> 2. Foo1 is a super class of Foo2
>
> Under Foo2 -> Attribute, the DbAttribute is blank for all the  Foo2  
> own
> attributes.
>
> Yes, I have done some edited and it was ok until I reopen the  
> cayenne.xml
> file. I am writting my own singleclass.vm template, and the absence  
> of Foo2
> DbAttributes mean that I cannot access the dbAttribute methods such as
> MaxLength(), Name() etc. to do the following:
>
> @javax.persistence.Column(name = "${dbAttr.Name}",
> length="${dbAttr.MaxLength}" #if($dbAttr.isMandatory()), nullable =  
> false
> #else , nullable = true #end)
>     public ${attr.Type} get${stringUtils.capitalized($attr.Name)}() {
>         return this.${attr.Name};
>     }
>
> I suppose, this is not what cayenne is meant for, but eh, that's what
> invention is all about.
>
> What must I do to force a display of all Foo2 DbAtttibutes ?
>
>
> -- 
> View this message in context: http://www.nabble.com/Missing- 
> DbAttribute-tf2008259.html#a5516956
> Sent from the Cayenne - User forum at Nabble.com.
>
>


Mime
View raw message