I've seen several messages discussing TOPLink on this list. I've been evaluating it lately and have identified a number of restrictions it imposes on the way your Java classes must be coded. I'm interested in hearing whether others have run into these same restrictions. Am I off base on any of these?
1) All object fields that are mapped to a database table column must either be public or have both get and set methods that are public. There are many cases when a class wishes to provide a get method but no set method because the field is read-only.
2) Methods that provide access to collections must return the collection object (ex. a Vector) instead of an object such as an Enumeration of Iterator. There are many cases when a class doesn't want to do this because it doesn't want to allow callers to modify the collection.
3) Every class on the "many end" of a one-to-many relationship must have a field that holds a reference back to the "one end". There are many cases when it is unnatural for that class to have knowledge of the other class. Even worse, if a class can be referenced by collections in multiple other classes, it must hold a reference back to each of them.
4) When using JDK 1.1, only Vector is supported for one-to-many mappings, not Hashtable. JDK 1.2 must be used to utilize Hashtable and other collection classes.
--
__ __
/ \/ \ Object Computing, Inc.
\ / ark (314)589-1617 pager
\ / (314)955-8087 A.G.Edwards
\ / olkmann [EMAIL PROTECTED]
\/
