My Torque schema definition specifies tables with foreign keys which span Java packages, and I have Bean generation turned on. By default, this causes Torque to generate Java code which doesn't compile due to a number of issues:

1. In each bean class with a foreign key constraint that spans packages, the generated import statements for the Bean classes in the foreign package are assumed to be in the local package, and therefore reference non-existent classes. 2. Classes with cross-package foreign keys attempt to call the methods create[ClassName]([BeanClassName]) and getBean(IdentityMap) (which have default package-level access) from a different package.

I'm getting around issue #1 by way of an ant <replace> task which fixes the code.

For issue #2, I've modified the template files that the generator uses to make the methods create${table.JavaName}(${beanClassName}) and getBean(IdentityMap) public. I'm just wondering if anyone forsees a real security concern with this change?


--
Robert Dietrick


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to