From: Bill Kelly Date: 2003-07-18T01:30:49+09:00 Subject: Re: reliable way of finding Objects Class? Hi, From: > > My problem is in a Persistence Framework that I have, and with > dynamically generated classes from a database schema ( and in a > separate but similar issue with dynamically created classes from a > resultSet). > > I need to find the objects class to get the correct database mapping, > but the objects are (in this case) dynamically created from a > database schema, and several of those overide class. > > I was hoping to be able to find an objects class from a different > object, perhaps Class. Something like Class.class(obj), that way I > would not have to worry about naming clashes. How about maybe aliasing the 'class' method to something you can presume nothing could ever clash with? Silly example: class Object alias no_way_in_doodely_heckfire_to_have_name_clash_with_class class end puts 2.no_way_in_doodely_heckfire_to_have_name_clash_with_class => Fixnum ? Regards, Bill