-->
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.  [ 10 posts ] 
Author Message
 Post subject: Creating "Tablespace"-Attribute with XDOCLET
PostPosted: Tue Sep 28, 2004 6:08 am 
Newbie

Joined: Sat Aug 21, 2004 7:53 am
Posts: 4
Location: Hofheim, Germany
We are using XDOCLET to generate our database scripts. Now we have the requirement to generate the table-Create-Statements with the "tablespace"-attribute for an Oracle-Database. I know that there is a schema-attribute but this puts a table in a dedicated schema. We would like to keep all tables in the same schema but the tables should be stored in different tablespace regions.

using

/**
* @hibernate.class table="customer"
*
* I know that this exactly does not exist, only here to express what I am looking for
* @hibernate.tablespace="MYTABLESPACE"
*
*/

The output should be as follows:

create table CUSTOMER
(
...
)
tablespace MYTABLESPACE;

I looked through the dts and the docs but could find exactly what I am looking for. Is there a way to to do that?

If not, could it be easily added to the XDOCLET Generator? If yes, and I had a short guideline I would even volunteer to contribute.

Stefan


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 28, 2004 7:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
not possible now, but you should be able to very easily hack Hibernate to support this - it would be trivial

In Hibernate3 there is actually a hook to append something Dialect-specific to the end of a create table statement


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 30, 2004 5:54 am 
Newbie

Joined: Sat Aug 21, 2004 7:53 am
Posts: 4
Location: Hofheim, Germany
Gavin, can you give a short hint, where I would implement that and I go forward and do that :-)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 5:03 am 
Newbie

Joined: Tue Aug 23, 2005 12:05 pm
Posts: 7
stefan.hoehn : Did you find what to add (and where) to solve your problem about tablespaces ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 12:23 pm 
Newbie

Joined: Sat Aug 21, 2004 7:53 am
Posts: 4
Location: Hofheim, Germany
No, not really.

I met Gavin and we discussed it. As it is really oracle-specific he said he wouldn't like to put that in. We actually did it finally with an ant-script that added the needed information after the script has been generated.

Stefan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 1:19 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
I think PostgreSQL uses tablespaces, too, so it's certainly not an Oracle-only thing. Was that the only reason for not putting it in? I think it would be a nice feature.

Gavin, if someone submitted a patch, are you still against putting it in (would it be a waste of time)?

_________________
nathan


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 4:51 am 
Beginner
Beginner

Joined: Tue Sep 23, 2003 5:00 pm
Posts: 40
Hi,
I am also looking for a way to specify the tablespace in the DDL using XDoclet.

I would apreciate it if someone could give us a hint to know how we could hack hibernate to support it.

Thanks in advance,
sylvain_2020


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 11:37 am 
Beginner
Beginner

Joined: Tue Sep 23, 2003 5:00 pm
Posts: 40
Hi again,

Still completly stuck with this problem of tablespace. I am not expecting to get directly the answer but I just would like to get some help.

Is it just a modification to do on hibernate or on XDoclet as well ?

Any piece of help will be very very apreciated.

sylvain_2020


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 6:25 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
As mentioned above, post processing the DDL would be your best (and shortest) bet.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 12, 2005 7:49 am 
Newbie

Joined: Tue Aug 23, 2005 12:05 pm
Posts: 7
sylvain_2020 wrote:
Is it just a modification to do on hibernate or on XDoclet as well ?
sylvain_2020

I would say it needs some modification in hibernate AND in xDoclet.
Having look at how to implement this feature, I confirm it is certainly easier to use an Ant script to post processing your ddl file.
(But I hope someone will implement it "one day").


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.