-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Persist class using Adapter?
PostPosted: Wed Apr 28, 2004 5:05 pm 
Newbie

Joined: Thu Dec 18, 2003 3:20 pm
Posts: 6
I have a persistent class which I load using the Adapter pattern.

For example:
a) Proposal class is mapped and persistent
b) ProposalAdapter extends Proposal but is part of another package and not mapped. It only job is to adapt to the persistent domain model.

When I try to save the ProposalAdapter I get a "MappingException: No persister for ..." exception. It expects to see a mapping for the adapter class.

Ideally, I'd like it to save the adapter class as its base-class without having to define a <subclass/> mapping in the mapping file. I also don't have control over the database table to add a discriminator column.

I'll always retrieve it as the base class once saved.

Any ideas on if this is possible?

Thanks,
Don


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.