Firstly, the API *should* use Class objects to reduce the possibility of
runtime errors. I forget which project I saw recently that had used strings
and was now moving to using class objects. Internally, we *could* use
classnames, but that would be slower, right? Its much quicker to take an
identityHashCode than to compute the hash of a (possibly quite long) String.
Or am I wrong on this?

As for why can't we compile mappings without the classes, thats because
various things (property types, etc) may be determined by reflection. I
still think this is a nice feature.

----- Original Message -----
From: "Max Rydahl Andersen" <[EMAIL PROTECTED]>
Cc: "hibernate list" <[EMAIL PROTECTED]>
Sent: Thursday, November 07, 2002 7:23 PM
Subject: Re: [Hibernate] Hooking into Hibernate classloader


>
> > But this doesn't handle things like SessionFactory.getClassMetadata,
> > which takes a Class.
>
> Just asking out of personal interest :)
> why is everything in hibernate bound up onto Class objects, why not
> fully-qualifed-names in
> the form of strings instead ?
>
> That would make it more flexible and resistant to things that might not be
> availble on the classpath
> and e.g. make it possible to load internal mapping model and use it for
> codegeneration and other
> stuff which in its nature cannot rely on the classing being in the
> classpath.
>
> /max
>
> > Which leads me to believe that maybe it is better
> > to keep this all out of Hibernate and just say that it's up to the
> > application to wrap the Session, SessionFactory, and other public
> > interfaces appropriately.
> >
> > -Chris
> >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by: See the NEW Palm
> > Tungsten T handheld. Power & Color in a compact size!
> > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
> > _______________________________________________
> > hibernate-devel mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/hibernate-devel
> >
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: See the NEW Palm
> Tungsten T handheld. Power & Color in a compact size!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to