You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Hernâni Cerqueira <hr...@gmail.com> on 2007/03/11 03:19:30 UTC
Using views
Hello all,
First of all i want to comment to any torque creator or developer under
here that this tool is perfect. I don't know how did i spend so much
time without it. Sorry if this isn't the right place for those kibd of
coments but i didn't know where to do that.
And now, my doubt. Is i possible to use views with torque. I've already
searched documentation about that, and i didn't find anything, so i have
few hopes, but anyway...
Thanks in advance
Hernâni
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Using views
Posted by Hernâni Cerqueira <hr...@gmail.com>.
Greg Monroe escreveu:
> Currently there is no easy way to do this. One workaround
> if you really need to limit access is to specify the
> protected="true" option on all columns in the XML.
>
> If I remember correctly, this should change the set/get
> methods from public to protected. You can then manually
> override the getter methods as public in the stub classes.
>
>
That fits my needs. Thank you all for your time and patience.
Cheers,
Hernâni
>> -----Original Message-----
>> From: Hernâni Cerqueira [mailto:hrcerqueira@gmail.com]
>> Sent: Monday, March 12, 2007 9:32 AM
>> To: Apache Torque Users List
>> Subject: Re: Using views
>>
>> Greg Monroe escreveu:
>>
>>> FWIW, by definition in SQL, views are the same as tables
>>> except that some fields may not be writable. So, defining
>>> them as tables in Torque will work for all DBs.
>>>
>>> One minor thing to do when defining the XML for these is
>>> to add the skipSql="true" attribute to the table definition.
>>> This will cause this table to be skipped in any generator
>>> sql creation.
>>>
>>>
>> Hum, and is there any way of disabling the setter methods,
>> and saves and
>> stuff on class generation?
>>
>>
>>> Also, full support for views is on the list for version 4.0
>>> (but that will be a while).
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: Hernâni Cerqueira [mailto:hrcerqueira@gmail.com]
>>>> Sent: Sunday, March 11, 2007 8:38 PM
>>>> To: Apache Torque Users List
>>>> Subject: Re: Using views
>>>>
>>>> Jeff Brekke escreveu:
>>>>
>>>>
>>>>> Hernâni Cerqueira wrote:
>>>>>
>>>>>
>>>>>> Hello all,
>>>>>>
>>>>>> First of all i want to comment to any torque creator or
>>>>>>
>> developer
>>
>>>>>> under here that this tool is perfect. I don't know how did
>>>>>>
>>>>>>
>>>> i spend so
>>>>
>>>>
>>>>>> much time without it. Sorry if this isn't the right place
>>>>>>
>>>>>>
>>>> for those
>>>>
>>>>
>>>>>> kibd of coments but i didn't know where to do that.
>>>>>>
>>>>>> And now, my doubt. Is i possible to use views with torque. I've
>>>>>> already searched documentation about that, and i didn't find
>>>>>> anything, so i have few hopes, but anyway...
>>>>>>
>>>>>>
>>>>> Dependant on the database you're using, but we have
>>>>>
>>>>>
>>>> successfully used
>>>>
>>>>
>>>>> them with Sybase. Just have the view name the same as the
>>>>>
>>>>>
>>>> table name
>>>>
>>>>
>>>>> your using in your definition.
>>>>>
>>>>>
>>>>>
>>>> I already did that with pg, but i thought that it wasn't the
>>>> right solution. But that's cool, now i know that my solution
>>>> it's not a bad one, ;-)
>>>>
>>>> Thank's for the repy
>>>> Hernâni
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>>
>>>> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>>>> For additional commands, e-mail: torque-user-help@db.apache.org
>>>>
>>>>
>>>>
>>>>
>>> Duke CE Privacy Statement
>>> Please be advised that this e-mail and any files
>>>
>> transmitted with it are confidential communication or may
>> otherwise be privileged or confidential and are intended
>> solely for the individual or entity to whom they are
>> addressed. If you are not the intended recipient you may not
>> rely on the contents of this email or any attachments, and we
>> ask that you please not read, copy or retransmit this
>> communication, but reply to the sender and destroy the email,
>> its contents, and all copies thereof immediately. Any
>> unauthorized dissemination, distribution or copying of this
>> communication is strictly prohibited.
>>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>>
>>> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: torque-user-help@db.apache.org
>>>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: torque-user-help@db.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Using views
Posted by "Jeffrey D. Brekke" <jb...@wi.rr.com>.
It would be nice to have a readonly="true" attribute at a table level to
generate a torque om object with no setters. We've wanted this even
before the view use case.
Greg Monroe wrote:
> Currently there is no easy way to do this. One workaround
> if you really need to limit access is to specify the
> protected="true" option on all columns in the XML.
>
> If I remember correctly, this should change the set/get
> methods from public to protected. You can then manually
> override the getter methods as public in the stub classes.
--
=====================================================================
Jeffrey D. Brekke jbrekke@wi.rr.com
Wisconsin, USA brekke@apache.org
ekkerbj@yahoo.com
http://www.bloglines.com/blog/jbrekke ekkerbj@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
RE: Using views
Posted by Greg Monroe <Gr...@DukeCE.com>.
Currently there is no easy way to do this. One workaround
if you really need to limit access is to specify the
protected="true" option on all columns in the XML.
If I remember correctly, this should change the set/get
methods from public to protected. You can then manually
override the getter methods as public in the stub classes.
> -----Original Message-----
> From: Hernâni Cerqueira [mailto:hrcerqueira@gmail.com]
> Sent: Monday, March 12, 2007 9:32 AM
> To: Apache Torque Users List
> Subject: Re: Using views
>
> Greg Monroe escreveu:
> > FWIW, by definition in SQL, views are the same as tables
> > except that some fields may not be writable. So, defining
> > them as tables in Torque will work for all DBs.
> >
> > One minor thing to do when defining the XML for these is
> > to add the skipSql="true" attribute to the table definition.
> > This will cause this table to be skipped in any generator
> > sql creation.
> >
> Hum, and is there any way of disabling the setter methods,
> and saves and
> stuff on class generation?
>
> > Also, full support for views is on the list for version 4.0
> > (but that will be a while).
> >
> >
> >> -----Original Message-----
> >> From: Hernâni Cerqueira [mailto:hrcerqueira@gmail.com]
> >> Sent: Sunday, March 11, 2007 8:38 PM
> >> To: Apache Torque Users List
> >> Subject: Re: Using views
> >>
> >> Jeff Brekke escreveu:
> >>
> >>> Hernâni Cerqueira wrote:
> >>>
> >>>> Hello all,
> >>>>
> >>>> First of all i want to comment to any torque creator or
> developer
> >>>> under here that this tool is perfect. I don't know how did
> >>>>
> >> i spend so
> >>
> >>>> much time without it. Sorry if this isn't the right place
> >>>>
> >> for those
> >>
> >>>> kibd of coments but i didn't know where to do that.
> >>>>
> >>>> And now, my doubt. Is i possible to use views with torque. I've
> >>>> already searched documentation about that, and i didn't find
> >>>> anything, so i have few hopes, but anyway...
> >>>>
> >>> Dependant on the database you're using, but we have
> >>>
> >> successfully used
> >>
> >>> them with Sybase. Just have the view name the same as the
> >>>
> >> table name
> >>
> >>> your using in your definition.
> >>>
> >>>
> >> I already did that with pg, but i thought that it wasn't the
> >> right solution. But that's cool, now i know that my solution
> >> it's not a bad one, ;-)
> >>
> >> Thank's for the repy
> >> Hernâni
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> >> For additional commands, e-mail: torque-user-help@db.apache.org
> >>
> >>
> >>
> >
> > Duke CE Privacy Statement
> > Please be advised that this e-mail and any files
> transmitted with it are confidential communication or may
> otherwise be privileged or confidential and are intended
> solely for the individual or entity to whom they are
> addressed. If you are not the intended recipient you may not
> rely on the contents of this email or any attachments, and we
> ask that you please not read, copy or retransmit this
> communication, but reply to the sender and destroy the email,
> its contents, and all copies thereof immediately. Any
> unauthorized dissemination, distribution or copying of this
> communication is strictly prohibited.
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Using views
Posted by Hernâni Cerqueira <hr...@gmail.com>.
Greg Monroe escreveu:
> FWIW, by definition in SQL, views are the same as tables
> except that some fields may not be writable. So, defining
> them as tables in Torque will work for all DBs.
>
> One minor thing to do when defining the XML for these is
> to add the skipSql="true" attribute to the table definition.
> This will cause this table to be skipped in any generator
> sql creation.
>
Hum, and is there any way of disabling the setter methods, and saves and
stuff on class generation?
> Also, full support for views is on the list for version 4.0
> (but that will be a while).
>
>
>> -----Original Message-----
>> From: Hernâni Cerqueira [mailto:hrcerqueira@gmail.com]
>> Sent: Sunday, March 11, 2007 8:38 PM
>> To: Apache Torque Users List
>> Subject: Re: Using views
>>
>> Jeff Brekke escreveu:
>>
>>> Hernâni Cerqueira wrote:
>>>
>>>> Hello all,
>>>>
>>>> First of all i want to comment to any torque creator or developer
>>>> under here that this tool is perfect. I don't know how did
>>>>
>> i spend so
>>
>>>> much time without it. Sorry if this isn't the right place
>>>>
>> for those
>>
>>>> kibd of coments but i didn't know where to do that.
>>>>
>>>> And now, my doubt. Is i possible to use views with torque. I've
>>>> already searched documentation about that, and i didn't find
>>>> anything, so i have few hopes, but anyway...
>>>>
>>> Dependant on the database you're using, but we have
>>>
>> successfully used
>>
>>> them with Sybase. Just have the view name the same as the
>>>
>> table name
>>
>>> your using in your definition.
>>>
>>>
>> I already did that with pg, but i thought that it wasn't the
>> right solution. But that's cool, now i know that my solution
>> it's not a bad one, ;-)
>>
>> Thank's for the repy
>> Hernâni
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: torque-user-help@db.apache.org
>>
>>
>>
>
> Duke CE Privacy Statement
> Please be advised that this e-mail and any files transmitted with it are confidential communication or may otherwise be privileged or confidential and are intended solely for the individual or entity to whom they are addressed. If you are not the intended recipient you may not rely on the contents of this email or any attachments, and we ask that you please not read, copy or retransmit this communication, but reply to the sender and destroy the email, its contents, and all copies thereof immediately. Any unauthorized dissemination, distribution or copying of this communication is strictly prohibited.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
RE: Using views
Posted by Greg Monroe <Gr...@DukeCE.com>.
FWIW, by definition in SQL, views are the same as tables
except that some fields may not be writable. So, defining
them as tables in Torque will work for all DBs.
One minor thing to do when defining the XML for these is
to add the skipSql="true" attribute to the table definition.
This will cause this table to be skipped in any generator
sql creation.
Also, full support for views is on the list for version 4.0
(but that will be a while).
> -----Original Message-----
> From: Hernâni Cerqueira [mailto:hrcerqueira@gmail.com]
> Sent: Sunday, March 11, 2007 8:38 PM
> To: Apache Torque Users List
> Subject: Re: Using views
>
> Jeff Brekke escreveu:
> > Hernâni Cerqueira wrote:
> >> Hello all,
> >>
> >> First of all i want to comment to any torque creator or developer
> >> under here that this tool is perfect. I don't know how did
> i spend so
> >> much time without it. Sorry if this isn't the right place
> for those
> >> kibd of coments but i didn't know where to do that.
> >>
> >> And now, my doubt. Is i possible to use views with torque. I've
> >> already searched documentation about that, and i didn't find
> >> anything, so i have few hopes, but anyway...
> >
> > Dependant on the database you're using, but we have
> successfully used
> > them with Sybase. Just have the view name the same as the
> table name
> > your using in your definition.
> >
> I already did that with pg, but i thought that it wasn't the
> right solution. But that's cool, now i know that my solution
> it's not a bad one, ;-)
>
> Thank's for the repy
> Hernâni
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication or may otherwise be privileged or confidential and are intended solely for the individual or entity to whom they are addressed. If you are not the intended recipient you may not rely on the contents of this email or any attachments, and we ask that you please not read, copy or retransmit this communication, but reply to the sender and destroy the email, its contents, and all copies thereof immediately. Any unauthorized dissemination, distribution or copying of this communication is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Using views
Posted by Hernâni Cerqueira <hr...@gmail.com>.
Jeff Brekke escreveu:
> Hernâni Cerqueira wrote:
>> Hello all,
>>
>> First of all i want to comment to any torque creator or developer
>> under here that this tool is perfect. I don't know how did i spend so
>> much time without it. Sorry if this isn't the right place for those
>> kibd of coments but i didn't know where to do that.
>>
>> And now, my doubt. Is i possible to use views with torque. I've
>> already searched documentation about that, and i didn't find
>> anything, so i have few hopes, but anyway...
>
> Dependant on the database you're using, but we have successfully used
> them with Sybase. Just have the view name the same as the table name
> your using in your definition.
>
I already did that with pg, but i thought that it wasn't the right
solution. But that's cool, now i know that my solution it's not a bad
one, ;-)
Thank's for the repy
Hernâni
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: Using views
Posted by Jeff Brekke <jb...@wi.rr.com>.
Hernâni Cerqueira wrote:
> Hello all,
>
> First of all i want to comment to any torque creator or developer under
> here that this tool is perfect. I don't know how did i spend so much
> time without it. Sorry if this isn't the right place for those kibd of
> coments but i didn't know where to do that.
>
> And now, my doubt. Is i possible to use views with torque. I've already
> searched documentation about that, and i didn't find anything, so i have
> few hopes, but anyway...
Dependant on the database you're using, but we have successfully used
them with Sybase. Just have the view name the same as the table name
your using in your definition.
--
=====================================================================
Jeffrey D. Brekke jbrekke@wi.rr.com
Wisconsin, USA brekke@apache.org
ekkerbj@yahoo.com
ekkerbj@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org