----- Original Message -----
From: "Konstantin Priblouda" <[EMAIL PROTECTED]>
To: "Mauro Sergio Silva" <[EMAIL PROTECTED]>
Sent: Tuesday, December 16, 2003 9:07 AM
Subject: Re: [Hibernate] Xdoclet stuffs...


>
> --- Mauro Sergio Silva <[EMAIL PROTECTED]>
> wrote:
> > Hi Konstantin
>
> Hi Mario,
> I think we shall move this tread to hibernate forum.
> As you may see, we discussing this off the list, and
> hibernate folks can not correct us.
>
> ( I'm already discussing xdoclet stuff there )
>
>
> > ----- Original Message -----
> > From: "Konstantin Priblouda" <[EMAIL PROTECTED]>
> > To: "Mauro Sergio Silva" <[EMAIL PROTECTED]>
> > Sent: Monday, December 15, 2003 11:55 AM
> > Subject: Re: [Hibernate] Xdoclet stuffs...
> >
> >
> > >
> > > --- Mauro Sergio Silva <[EMAIL PROTECTED]>
> > > wrote:
> > > > Sorry, I was thinking that it was an answer from
> > > > Hibernate-devel list(couse
> > > > the text appended in your e-mail)
> > >
> > > Yes it was. But I happen to be xdoclet comiter,
> > and
> > > I'm working on xdoclet2 plugin right now...
> > >
> > > > I think the confusion is couse the coment in
> > > > hibernate dtd.
> > >
> > > It's in deed somehow confusing...
> > >
> > > > The column element that could be placed in
> > propertys
> > > > and ids is the only
> > > > place where I could use the sql-type attribute.
> > > > Hibernate has a tool called schemaexport that
> > reads
> > > > the hbm.xmls and
> > > > generate the schema of your database using those
> > > > informations, there is
> > > > other tool called schema update that generate
> > the
> > > > update of your schema
> > > > based in jdbc metada. If you want to custumize
> > the
> > > > ddl generated based in
> > > > your mapping files you culd put some
> > informations in
> > > > your
> > > > schema like sql-type to custumize the generated
> > ddl.
> > > >
> > > > For example if you declare your id as an string
> > the
> > > > schemaexport will
> > > > generate your id as a  varchar[255]  for mysql
> > > > dialect. But if you use the
> > > > column element inside the id element and specify
> > the
> > > > sql-type attribute as
> > > > char[32], for example) the schema exprot will
> > > > generate your id column as a
> > > > varchar[32] for mysql dialect that is the right
> > > > column lenght to uuid.hex
> > > > ( 32 lenght id).
> > >
> > >
> > > I do not know much about schemaexport.  But column
> > > elements are somehow tricky, and not well
> > supported by
> > > xdoclet. For nested column elements we will have
> > to
> > > specify additional xdoclet tags ( for example like
> > > @hibernate.key-column  or @hibernate.index-column
> > )
> > >
> > > And as those column sepcifications are required
> > only
> > > for composite keys, alternative would be to look
> > up
> > > class in question, and proces his ID properties...
> > > ( this is even more tricky, and this class is may
> > be
> > > not available as source... )
> > >
> > This is  exactly the point where we desagree. You
> > sad that column
> > specification is required only for composite keys,
> > but
> > there is other two situations where column element
> > is used in mapping files,
> > in both situations the column is used
> > to the same porpuse to custumize the ddl. I will use
> > some examples in the
> > ReferenceDocumentation 2.1 of Hibernate
> > to ilustrate what I'm talking about (the PDF version
> > to be much precise). I
> > know that you are not a Hibernate developer I'm
> > using the reference just to clarify my example.
> >
> > First in page 4 Section 1.3 Mapping the cat in the
> > id element you culd see a
> > nested element column, custumizing the way
> > the ddl will be genertated. You culd see in this
> > example that the column
> > element culd be used in the id element, not in
> > composite key.
> >
> > In the page 5 you culd see the same use of column
> > element inside the
> > property for the same porpouse.
> >
> > In chapter 5 section 5.4 it talks about Custumizing
> > the DDL and it talks
> > about the use of column element iside a property.
> > You can see that
> > in the secon example it doesn't refeare about
> > sql-type attribute, couse if
> > you see in the dtd there is only one place where the
> > sql-type
> > attribute culd be used that is in the column
> > element.
> >
> > On chapter 18 section 18.1.1 custumizing the schema
> > page 116 again you culd
> > see some examples using the column element.
> >
> > In the  version 1.2 b4 you culd use columns elemnts
> > in propertys to generate
> > mapping files like in the examples above becouse
> > the properties.xsd the column is merged inside
> > property and it generate the
> > column attribute or the column element if you use
> > the
> > the hibenate.property and hibernate.column in the
> > same method,it works fine.
> > What i did was patch the column.xsd and merged
> > it in the id element changind the hibernate.xsd too.
> >
> > The point is if it is possible to use the colun
> > inside id ant property when
> > I write the mapping by hand Why it wuld not be
> > possible to generate
> > it using xdoclete, in fact with the 1.2b4 you  culd
> > use it in propertys.
>
>
> Well, our usage pattern does differ.
>
> I never use schema export - I just dump my test
> database ( produced by my unit tests )  and then
> tune schema  manually.
>
> And it does not happen oft....
>
> I see now, that I have to provide column elements
> ( and respective tags )
>
>
> > > You may look into current development of xdoclet 2
> > > plugin -- if you manage to compile verything
> > > necessary...
> > > ( may be tricky )
> > >
> > Unfortunatly I culd not get the xdoclet version 2
> > from CVS. When I tryed to
> > do it in the sourceforge host there is a file saying
> > that the code was moved
> > to xdoclet.codehous.org  but the code isnt there
> > too. :(.
>
> This is also tricky :) There are several components
> now
>
> xdoclet itself lives at: xdoclet.codehaus.org
> ( you will need this, as well as generama - same
> repository:
> :pserver:[EMAIL PROTECTED]:/cvsroot/xdoclet
> modules xdoclet / generama
> )
>
> You will also need:
>  - qdox ( qdox.codehaus.org )  -
> :pserver:[EMAIL PROTECTED]:/cvsroot/qdox qdox
>  - picocontainer
> :pserver:[EMAIL PROTECTED]:/cvsroot/picocontainer
> pico
>  - picoextras  -
> :pserver:[EMAIL PROTECTED]:/cvsroot/nanocontainer
> nano
>
> and of course xdoclet-2 plugins:
>
> they are at sourceforge as project xdoclet-plugins...
>
> I can not promiss that everything will compile off the
> shelf...
>
> regards,
>
> =====
> ----[ Konstantin Pribluda ( ko5tik ) ]----------------
> Zu Verst�rkung meines Teams suche ich ab Sofort einen
> Softwareentwickler[In] f�r die Festanstellung.
> Arbeitsort: Mainz
> Skills:  Programieren, Kentnisse in OpenSource-Bereich
> ----[ http://www.pribluda.de ]------------------------
>
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
>



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to