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:51:40 GMT
BTW, if you were going to achieve something akin to JPA defaults  
functionality, this may be coming soon. This sort of works already in  
the JPA module which is external to the rest of the runtime. We might  
as well push it down the stack, making the defaults native to the  
rest of Cayenne. Just thinking out loud...

Andrus


On Jul 27, 2006, at 9:39 AM, Andrus Adamchik wrote:

> 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