Generating Schema and Map from EJB Group.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mariola_Gburzynski
Posted On:   Friday, March 1, 2002 02:11 PM

How do I map a field into a BLOB?


I am generating schema and map from EJB group in VAJ. All the fields in my EntityBean are of type String except one CustomerAddress is a class that implements Serializable. I expected this field to be mapped into a BLOB.


Instead I get fields ( city, street etc) from my CustomerAddress class mapped into varchars just like the other String fields from my bean.
I am working through an example from EJB Development for VAJ Redbook.
Thank you.
Mariola

Re: Generating Schema and Map from EJB Group.

Posted By:   daniel_walker  
Posted On:   Monday, March 11, 2002 04:19 PM

VAJ is being clever ;-) It's probably a good idea for your database schema to store CustomerAddress as seperate fields (tried running a query on a BLOB lately?) You could change it manually if this is really what you want. In the Schema browser create a column called customerAddress and set it to a BLOB type. Set the VAP Converter to a VapBinaryStreamToSerializableObjectConverter. Now in the Map Browser, 'edit property map' and create a 'simple' mapping between your attribute and your table column.
About | Sitemap | Contact