db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Monroe" <Greg.Mon...@DukeCE.com>
Subject RE: Does torque support Mysql 5.0 and view
Date Fri, 01 Dec 2006 19:15:02 GMT
I think you should be able to write to a view.  The nosql
option does not prevent the save, delete, update methods of 
the "view" objects from being created.  Torque just thinks
it's a normal table (which is what views are supposed to be).  

The only issues with writing to a view I can think of are:

Problems if the DB prevents some fields from be writable, 
e.g. one of the fields is the result of a function.  

Also, there are some issues in saving or updating tables 
without a primary keys.  Note that you can define a primary
key in the XML even if the DB does not enforce it.  So, if 
your view has a column that can be used as a primary key, 
you can get around them that way.

Greg

> -----Original Message-----
> From: Carl Manaster [mailto:CarlM@ACTIVX.com] 
> Sent: Friday, December 01, 2006 2:02 PM
> To: torque-user@db.apache.org
> Subject: RE: Does torque support Mysql 5.0 and view
> 
> 
> Hi, Thomas,
> 
> Do I understand correctly that Torque supports only reading 
> from (and not writing to) views?
> 
> Thanks,
> --Carl
> 
> 
> Thomas Fischer wrote:
> > 
> > 
> > no problems were reported regarding Mysql 5, so this should work. 
> > Torque supports reading from views (just declare them like 
> you would 
> > declare a table but omit sql generation for it), but you have to 
> > create them manually. Torque does not use triggers at all, 
> but you can 
> > insert them manually without any problems.
> > 
> >        Thomas
> > 
> > David Zhao <wzhao6898@gmail.com> schrieb am 12.12.2005 21:19:06:
> > 
> >> Hi there,
> >>
> >> Does current version of torque support MySQL 5.0 and view, trigger 
> >> and
> > such?
> >> Thanks,
> >>
> >> David
> > 
> > 
> 
> --
> View this message in context: 
> http://www.nabble.com/Does-torque-support-Mysql-5.0-and-view-t
f730011.html#a7644209
> Sent from the Apache DB - Torque Users mailing list archive 
> at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message