Sorry for the late response, but now we also needed clobs :-)
We have made a new model type and use javax.persistence.Lob annotation
together with ordinary String attribute.

I will add this in next release of Sculptor, but if you need it right away
you can add the following.

sculptor-generator.properties:
javaType.StringClob=String
db.oracle.type.StringClob=CLOB

SpecialCases.xpt:
«AROUND templates::DomainObject::jpaAnnotations FOR Attribute»
        «targetDef.proceed()»
        «IF type == "StringClob" »
        @javax.persistence.Lob
    «ENDIF»
«ENDAROUND»

/Patrik


Sascha Broich wrote:
> 
> Hi,
> 
> I'm wondering how CLOBs are saved.
> 
> In the model is defined:
> 
> Entity E {
>  scaffold
>  String title length="256";
>  Clob text nullable;
> }
> 
> E e=new E();
> e.setTitle("title");
> e.setText(Hibernate.createClob("Text"));
> 
> The generated code looks okay, but when I save the CLOB it will not
> persist:
> 
> E saved=eService.save(context,e);
> 
> saved.getText() returns null.
> 
> And in the database the CLOB column is null too.
> 
> 
> Regards,
> Sascha Broich
> 
> -- 
> Sascha Broich
> Development
> 
> TSA - Teleport Sachsen-Anhalt Service GmbH
> Herrenstraße 20 - D-06108 Halle
> 
> Phone: +49 39203 8 2524 - Fax: +49 39203 8 2511
> Email: sascha.bro...@tsa.de
> 
> Firmensitz: Steinfeldstraße 5, D-39179 Barleben
> Niederlassung: Herrenstraße 20, D-06108 Halle
> Geschäftsführer: Marco Langhof, Thomas Patzelt
> Prokurist: Heiko Bosse
> Amtsgericht: Stendal HRB 6388
> http://www.tsa.de
> 
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Saving-CLOBs-tp27703913s17564p28229107.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to