db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CG Monroe (JIRA)" <j...@apache.org>
Subject [jira] Commented: (TORQUE-72) Beans should not require torque.objectIsCaching = true setting to create all complexModel methods.
Date Wed, 24 Jan 2007 00:53:49 GMT

    [ https://issues.apache.org/jira/browse/TORQUE-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466875

CG Monroe commented on TORQUE-72:

Sorry to take so long to reply to this Thomas.. saw the comment but put it on hold because
my company was moving to a new building and that ate up my time (include parts of Xmas break..sigh).
 I'm just now finding the time to digest this.

Some additional background is that this came up in testing 3.3-RC1 against different combinations
of compile options.   This issue is really just a "placeholder" that there needs to be a clearer
understanding of bean behaviour and matching changes to the templates/test project to ensure
they works the way they are designed.

That said, in re-reading the Beans entry in the reference, I would think the correct behaviour
would be as follows:

If complexObjectModel = false, then a bean should just have the field setters/getters and
no FK methods.  This is the same as the Torque record.

If complexObjectModel = true, then a bean should have the same FK methods as the Torque record.

This should work regardless of the objectIsCaching setting.  The current templates don't do

As you point out, the hard part is deciding what the correct bean behaviour should be for
the objectIsCaching=true or false.  

If objectIsCaching=true, then the bean should get the current cache values.

If objectIsCaching=false, then as you said, the methods should return null.  I know that this
makes the methods worthless, but it makes beans and record objects symetrical.

> Beans should not require torque.objectIsCaching = true setting to create all complexModel
> --------------------------------------------------------------------------------------------------
>                 Key: TORQUE-72
>                 URL: https://issues.apache.org/jira/browse/TORQUE-72
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.3
>            Reporter: CG Monroe
>            Priority: Minor
> Record Objects generated with complexModel = true will include the get all associated
FK records methods, e.g.
>   List books = author.getBooks()
> regardless of the objectIsCaching setting.
> Beans however, will NOT generate the get associated FK records methods unless objectIsCaching
is true.
> FWIW, the get related PK object methods are generated, e.g.
>   Author a = book.getAuthor();
> regardless of objectIsCaching.
> The Bean template coding needs to be reviewed and fixed to generate code correctly.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message