Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] CGLIB Proxy Using Wrapper Policy

Hi All,
  Eclipselink rocks :clap:. Further diving in the code if found for the
inherited entities, I have to do something like

		cd.getInheritancePolicy().setClassExtractor(new ClassExtractor() {
				
				@Override
				public Class extractClassFromRow(Record row, Session session) {
					/*
					 * This is important and should return NULL
					 */
					if (row.get("REL_RELATIONS.SUBTYPE").equals(Relation.SUBTYPE_PERSON)) {
						return Relation.class;
					} else if
(row.get("REL_RELATIONS.SUBTYPE").equals(Relation.SUBTYPE_BANK)) {
						return Bank.class;
					} else if
(row.get("REL_RELATIONS.SUBTYPE").equals(Relation.SUBTYPE_ORGANIZATION)) {
						return Organization.class;
					} 
					return null;
				}
			});

Now every seems to work fine.

It will be awesome somebody in eclipselink can review my work.

Regards,
GM
-- 
View this message in context: http://old.nabble.com/CGLIB-Proxy-Using-Wrapper-Policy-tp28780712p28815892.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top