Historically, that was because we primarily used the
onebusaway-gtfs-hibernate to load GTFS data into a database, where it
would never be modified again. By marking the entity as "immutable",
it sped up data loading dramatically, as Hibernate could skip a lot of
checks on object querying and what not.
I'm not opposed to changing the mapping. I'm wondering if there is a
way to easily specify that all the classes are immutable
programatically for people who want to quickly load data read-only
into the database...
Brian
> --
> You received this message because you are subscribed to the Google Groups
> "onebusaway-developers" group.
> To post to this group, send email to onebusaway...@googlegroups.com.
> To unsubscribe from this group, send email to
> onebusaway-devel...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/onebusaway-developers?hl=en.
>
Indeed there seems to be a way of making entities read-only by
default, programmatically, by calling
Session.setDefaultReadOnly(true);
(http://docs.jboss.org/hibernate/core/3.5/reference/en/html/readonly.html#readonly-api-loaddefault)
What could be done is to remove the immutable flag on mapping and
setting by default read-only when creating the DAO. Default behavior
would not change and it would allow one to reset this flag if needed.
If you are OK with that, I can give it a try and propose a patch.
HTH,
--Laurent
Brian
On Fri, Sep 23, 2011 at 11:17 AM, Laurent Gregoire
<laurent....@gmail.com> wrote:
Excellent. In the meantime, before a new official release, one can use the library with the mutable version of the mapping file copied from the library, as I am doing.
Laurent Grégoire
laurent....@gmail.com
On Sun, Sep 25, 2011 at 12:59 PM, Laurent Gregoire