-->
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: best way to persist object as xml
PostPosted: Mon May 30, 2005 7:08 am 
Hello
I'm new to (N)Hibernate and have couple of questions .....(sorry for my bad english)

I have entity which holds reference to another object. This object is not entity itself and i don't want to persist it to any table. Just use XmlSerializer and save resulting xml to ntext column of my parent entity table.
Can you pleas kick my to the right direction ?
Implement ILifecycle interface ?
I ques, there is not direct support for this in NHibernate ?

I have second question....
I'm trying to test my DAL in the same way as NHibernate tests are wrote. So I Use SchemaExport to create and drop schema.
In my mapping files, I use <column> child elements (for property etc) to specifi column type, length etc.
Problem is that when I specify for example nvarchar column liky this:
Code:
<column name="Descr" length="200" sql-type="nvarchar" not-null="true"/>

resulting column is of type nvarchar, but WITHOUT length specified! This is problem because default length of (n)varchar columns on sql server 2000 is 1. However, I'v found workaround that I specify length like this: sql-type="nvarchar(200)"
Is this bug ?

Thanx for Your time !

Liwoj


Top
  
 
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.