-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: xdoclet and formula
PostPosted: Thu Sep 09, 2004 3:12 pm 
Newbie

Joined: Fri Apr 02, 2004 4:12 pm
Posts: 12
Has anyone been able to get xdoclet-1.2.2-SNAPSHOT to generate the "formula" parameter of "property" correctly? It is now "supported", but I'm not having any luck getting it to work...

RMC


Top
 Profile  
 
 Post subject: xdoclet and formula
PostPosted: Wed Oct 06, 2004 8:46 pm 
Newbie

Joined: Wed Aug 25, 2004 11:16 pm
Posts: 12
Location: San Francisco, CA
Quote:
Has anyone been able to get xdoclet-1.2.2-SNAPSHOT to generate the "formula" parameter of "property" correctly? It is now "supported", but I'm not having any luck getting it to work...

I just checked 1.2.2-RC1, and it's not in there.

Where exactly did you see support for the formula 'mode' of @hibernate.property??

As of today, I also need this parameter, and may try to add it myself this evening. If anyone has any comments or suggestions, or if it's already out there and I'm being dim, please let me know.

Cheers,
Christian


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 06, 2004 10:12 pm 
Newbie

Joined: Wed Aug 25, 2004 11:16 pm
Posts: 12
Location: San Francisco, CA
I have what seem to be a working patch for hibernatedoclet to handle formulas.

This is what I'm thinking in terms of a parameter for specifying a formula for a property:

Simple Example:
Code:
/**
* @hibernate.property formula = "( left(account_num, 6) )"
*/
public String getIssuerBin() { return issuerBin; }
public void setIssuerBin() { this.issuerBin = issuerBin; }


And it would produce the following mapping meta-data:
Code:
<property
    name="issuerBin"
    type="java.lang.String"
    formula="( left(account_num, 6) )"
    update="false"
    insert="false"
    access="property"
/>


It seems to be that these rules should be enforced when you are using a formula. Please let me know if this doesn't make sense (I can't see how it would make sense for these to be true).
    insert = "false"
    update = "false"
And that these settings should be ignored if present in the doclet tag, and thus, not placed in the hibernate mapping file:
    column
    not-null
    length
    unique

Does this make sense?
Christian


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 06, 2004 10:36 pm 
Newbie

Joined: Wed Aug 25, 2004 11:16 pm
Posts: 12
Location: San Francisco, CA
These are two useful links to JIRA:

My new feature request:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1102

An original feature request:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-920

XDT-920 led to the submission of a patch, the patch which the topic author who started this thread tried and was unable to get working. I also was unable to get it to work.

Christian


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 03, 2004 12:53 pm 
Newbie

Joined: Fri Dec 03, 2004 12:48 pm
Posts: 1
It seems to work if you specify
<hibernate version="2.0"/>
instead of 2.1


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 15, 2004 6:00 pm 
Newbie

Joined: Wed Aug 25, 2004 11:16 pm
Posts: 12
Location: San Francisco, CA
Quote:
It seems to work if you specify <hibernate version="2.0"/> instead of 2.1


I don't think specifying "2.1" does anything. The only options that enables additional features is "2.0". It's more of a major version indicator... so that even if you're using a v2.1.x version of hibernate, you should use the "2.0" indicator. Yeah, it's a little confusing, and probably should (but doesn't) take just a "2".

And yes, if you specifiy anything other than "2.0" in <hibernate version="2.0"/> it will disable the formula support (and also many other features).

Christian


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.