I have a base class for all my tables which has a method 'schemaname'
which returns just that.
In the table classes I do:
__PACKAGE__-table(__PACKAGE__-schemaname . '.device');
-
BR Alex
Am Montag, den 09.02.2009, 20:08 +0100 schrieb Benjamin Hitz:
Huh, I used this module and never noticed
Fetch a sequence value and use it for both your pk column and the second
one?
-
BR Alex
Am Donnerstag, den 26.03.2009, 17:21 +0100 schrieb Rob Kinyon:
On Thu, Mar 26, 2009 at 12:12, David Schmidt davew...@gmx.at wrote:
On Thu, Mar 26, 2009 at 3:56 PM, Rob Kinyon rob.kin...@gmail.com wrote:
+1
--
BR Alex
Am Dienstag, den 21.04.2009, 10:48 +0200 schrieb Ovid:
Hi all,
I need to be able to globally set these attributes on on those resultsource
methods which accept them:
{
cascade_delete = 0,
cascade_update = 0,
}
It seems like this is being handled on a
Am Montag, den 04.05.2009, 15:44 +0200 schrieb Ryan Cone:
On May 4, 2009, at 5:15 AM, Alexander Hartmaier wrote:
Am Freitag, den 01.05.2009, 00:48 +0200 schrieb Matt S Trout:
On Thu, Apr 30, 2009 at 03:53:52PM -0400, Ryan Cone wrote:
I am using DBIC with Oracle and I am trying
I had the need for this type of join in the past and was told to wait
for the SQL::Abstract rewrite.
Now version 1.5x is out but I haven't looked into it if it's already
possible now that there is subselect support.
I circumvent that problem with an additional result class which has a
select
Am Donnerstag, den 11.06.2009, 09:38 +0200 schrieb Doug Scoular:
However, I've recently discovered that people sometimes
manually add records to the database without obtaining
IDs from the sequence. If this happens what is the best
way to obtain the next ID value ? My suspicion
Am Montag, den 15.06.2009, 15:49 +0200 schrieb Johnny Gebreselassie:
Normally you would create an on-insert trigger that fills the id
column(s) in case none was passed to the query.
CREATE OR REPLACE TRIGGER yourschema.yourtriggername
BEFORE INSERT ON
I'm using it without problems.
That are the relevant lines of my result base class:
# validate by default
__PACKAGE__-validation_auto( 1 );
# don't filter by default
__PACKAGE__-validation_filter( 0 );
# use FVS for validation
__PACKAGE__-validation_module('FormValidator::Simple');
# generate
Am Dienstag, den 28.07.2009, 00:29 +0200 schrieb Rob Kinyon:
On Thu, Jul 23, 2009 at 08:28, Alexander
Hartmaieralexander.hartma...@t-systems.at wrote:
The DBMS validates data types, length, undef and foreign keys anyway, so
maybe using it as validator (parse its error messages) is a
I would also need those kind of joins.
I've worked around it by creating result view classes which restrict the
resultset when joined:
package NAC::Model::DBIC::Table::Device;
__PACKAGE__-resultset_class('NAC::Model::DBIC::ResultSet::Device');
__PACKAGE__-has_many( view_currently_in_maintenance
Am Mittwoch, den 30.09.2009, 12:45 +0200 schrieb Bernhard Graf:
Jose Luis Martinez schrieb:
2- I see that the Markup::Unified module requires, uses, and makes an
instance of the three markup modules that are supported. IMHO, I don't
think this is a good long-term strategy if you are
Am Donnerstag, den 01.10.2009, 03:41 +0200 schrieb Bill Moseley:
On Wed, Sep 30, 2009 at 3:00 PM, Wallace Reis reis.wall...@gmail.com
wrote:
Unable to restore schema at ../../lib/Storable.pm (autosplit
into
../../lib/auto/Storable/thaw.al) line 415
quote our mail system:
File deleted
The file dbic_ddl_admin.pl has been blocked due to the actual
antivirus policy. These types of files cannot be transferred over our
mail system.
Can you make it available as download please?
--
Best regards, Alex
Am Mittwoch, den 25.11.2009, 20:46 +0100
Thanks Dave!
--
Best regards, Alex
Am Donnerstag, den 26.11.2009, 11:30 +0100 schrieb Dave Howorth:
Alexander Hartmaier wrote:
Can you make it available as download please?
Can you just download it from the archive?
http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20091125
You should either use the abbreviation dbic OR the full name dbix-class,
not a mix of both.
--
Best regards, Alex
Am Sonntag, den 07.02.2010, 21:04 +0100 schrieb Ian:
Hi
I have created an initial release of DBIx::Class::Tree::NestedSet on
github at
I'd chain resultsets, that's exactly what the feature it was built for:
my $rs = $c-model('Users')-search({ nem = $nem });
if ( $megye ) {
$rs = $rs-search({ megye = $megye });
}
--
Best regards, Alex
Am Dienstag, den 23.03.2010, 15:31 +0100 schrieb Hetényi Csaba:
Thank You Rob, it is
Just like you would do with every perl class.
You could define a base class and subclass from it or use Moose roles.
--
Best regards, Alex
Am Freitag, den 02.04.2010, 10:35 +0200 schrieb 刘强:
package MyDB::Schema::Result::Artist;
use base qw/DBIx::Class::Core/;
Why do you not test your model with the newest DBIx::Class version and
just upgrade if everything works?
--
Best regards, Alex
Am Freitag, den 16.04.2010, 10:21 +0200 schrieb 老邪:
hi, all
i have a question about dbix::class 0.07006 ( i know it's old, but
my codes are base on it...). i
Or fix your code...
--
Best regards, Alex
Am Freitag, den 16.04.2010, 10:54 +0200 schrieb 老邪:
we did, our code is not good enough to work with newest dbix::class,
so, have to stay in 0.07 version now :(
On Fri, Apr 16, 2010 at 4:50 PM, Alexander Hartmaier
alexander.hartma...@t-systems.at
Why not just switch to a real db like Postgres or Oracle, I'm sure that
will fix your problem as well.
--
Best regards, Alex
Am Donnerstag, den 13.05.2010, 18:11 +0200 schrieb Matias E. Fernandez:
Hello again
On 2010-05-13, at 24:19, Marc Mims wrote:
I disagree with that. Consider this:
Are you using Catalyst::Model::DBIC::Schema or the old
Catalyst::Model::DBIC?
If the old one convert your Catalyst Model to
Catalyst::Model::DBIC::Schema which will likely fix the problem.
--
Best regards, Alex
Am Mittwoch, den 12.05.2010, 18:53 +0200 schrieb Stuart Dodds:
This message is
The inflatecolumn plugins create objects from strings coming out of the
database and stringify objects you pass you the column accessors back to
strings.
If you set the column to a string (the one from your xml file) the
plugin doesn't touch it.
So what you want is to create DateTime objects
/20/10 13:38, Alexander Hartmaier wrote:
The inflatecolumn plugins create objects from strings coming out of the
database and stringify objects you pass you the column accessors back to
strings.
If you set the column to a string (the one from your xml file) the
plugin doesn't touch
Hi Duncan,
I prefer to pass a DateTime object to the update to not tie my schema to
Oracle when not needed.
You also might trust the time on the app server(s) more than those on
the database servers.
Your date_updated column looks like you want to have it updated on every
update. If so use
I'm using Test::DBIx::Class'es fixtures because I didn't like and need
the fact that every row is in a separate file when using
DBIx-Class-Fixtures.
--
Best regards, Alex
Am Donnerstag, den 19.08.2010, 14:47 +0200 schrieb Zbigniew Lukasiak:
On Thu, Aug 19, 2010 at 2:27 PM, Lee Goddard
Note that by swapping column and value you will lose the advantage of
bind which makes sql injection impossible.
--
Best regards, Alex
On Wed, 2010-11-10 at 06:34 +0100, Mike Raynham wrote:
On 09/11/10 22:26, Peter Rabbitson wrote:
-nest...? what...?
I still don't understand how this
See below.
--
Best regards, Alex
On Tue, 2010-11-09 at 14:54 +0100, Mike Raynham wrote:
On 09/11/10 13:49, Steve wrote:
It appears that you are *not* chaining these resultsets...
If you first do...
# Narrow the search down if the start date is supplied.
$date_ranges = $rs-search({
to all that responded.
Regards
Jorge
Jorge González Villalonga
Director Técnico
DAIKON Integración y Desarrollo
S.L.
Telf: (+34) 91 188 08 28
Fax: (+34) 91 632 65 42
www.daikon.es
El 24/01/11 10:25, Alexander Hartmaier escribió:
This solution has the downside that you can't
I've added an after insert method modifier which calls discard_changes
for those result classes where I always want this to happen.
--
Best regards, Alex
On Wed, 2011-02-09 at 11:21 +0100, Dagfinn Ilmari Mannsåker wrote:
Peter Rabbitson rabbit+d...@rabbit.us writes:
Dagfinn Ilmari Mannsåker
This isn't directly related to this but such a long table name will fail
in Oracle.
--
Best regards, Alex
On Thu, 2011-02-10 at 00:08 +0100, John Napiorkowski wrote:
The DBIC::Fixtures-dump({all=1, ...}) option is really useful to just dump
the
entire db. However, if you are using
I've installed it almost two weeks ago on my notebook where I do almost
all development work and haven't had a problem with it since, great
work!
Note that I didn't try to use the new extended relations as they will
only be useful when they gain per-execute bind value support.
--
Best regards,
I'm cross-posting this to the DBIx::Class and the Catalyst mailing list
as both users might be interested in it.
I wanted to do this as soon as I've read the first blog post about the
ExtJS 4 data model and last Friday evening I've finally started writing it.
After a short discussion on
Why not create another result class for the different table?
The overlapping methods can be put in a base class or a role used by both.
Am 2011-05-17 17:14, schrieb Bill Moseley:
On Tue, May 17, 2011 at 7:43 AM, Peter Edwards
pe...@dragonstaff.co.ukmailto:pe...@dragonstaff.co.uk wrote:
Can
Am 2011-06-16 19:27, schrieb dorian taylor:
On Thu, Jun 16, 2011 at 10:17 AM, Peter Rabbitsonrabbit+d...@rabbit.us wrote:
This won't be wrong - -count returns how many objects you would receive
via -all/-next. If you want full count of the underlying source with
all limits removed - keep the
As a followup on SQL::Translator::Producer::ExtJS::Model::File (which I
won't develop further) I've finally found time to write
DBICx::Generator::ExtJS::Model which does the same but works on a
DBIx::Class instead of a SQL::Translator schema.
This has the advantage of knowing the relationship
I had the same message last week.
It happens when your Result(Set) object loses its schema.
That might happen because of freeze/thaw, in my case because of
Parallel::Iterator which does use Storable internally.
The fix is to insert this line before you serialize the object:
# to let DBIC
DBIx::Class::ResultSet::RecursiveUpdate can do that.
We'd love to see the functionality in core but noone has stepped up to
write tests against the dbic test schema so someone can implement it in
core.
Cheers, Alex
Am 2011-08-05 19:03, schrieb Martin Bendix:
Hi,
Using create in
Am 2011-09-13 21:46, schrieb Lyle Kopnicky:
Thanks for your help.
On Mon, Sep 12, 2011 at 6:06 PM, neil.lunn
n...@mylunn.id.aumailto:n...@mylunn.id.au wrote:
Was there some reason that this was not good enough for your purposes:
This will also replace a false value with undef.
You should better write:
$value = undef if $value eq '';
Am 2011-10-10 22:25, schrieb Peter Wood:
Thanks! That worked. I just added...
$value = undef if ! $value;
...before I ran the insert/update, and it correctly inserted a null string.
Try upgrading DBD::Oracle, i'm running 1.30 without problems. Also
what's your Oracle Client library version?
Am 2011-10-18 18:40, schrieb Roger Day:
DBIx::Class $VERSION = '0.08195';
$DBD::Oracle::VERSION = '1.24';
On Tue, Oct 18, 2011 at 5:19 PM, Alexander Hartmaier
alexander.hartma...@t
Am 2011-10-23 13:03, schrieb Aaron Trevena:
Hi all,
I was wondering what solutions people have come up with for dealing
with database schemas with hundreds of tables..
I was thinking of using namespaces and having some sort of
terminus/boundary namespace that terminates long strings of
Why don't you use the column IN (...) OR column IN (...) solution?
I'd like to see this as a patch for the Oracle SQLMaker.
Cheers, Alex
Am 2011-10-24 16:06, schrieb Jorge Gonzalez:
El 24/10/11 13:46, Matija Grabnar escribió:
Question is, my server has enough RAM to slurp the resultset and
first hit on https://metacpan.org/search?q=dbix%3A%3Aclass+dynamic+default
Am 2011-11-29 15:31, schrieb Benjamin Martin:
hello,
I am not sure if I am doing the right thing so I ask here for advice
please :)
I have 2 tables, chart and sections. A chart is made of multiple
sections (chart
You meant related_resultset, there is no such thing as a recordset in DBIC.
Also why don't you use find if you want to fetch a single result object from
the database?
You can use HRI with find too if that was the reason.
Am 2012-01-23 16:20, schrieb will trillich:
Whoops--
On Mon, Jan 23, 2012
deploy uses SQL::Translator as you can see in
Storage::DBI::deployment_statements.
The SQLT schema doesn't currently have sequence objects so there is no
place to store those names.
Also not all databases have them or use them for autoinc pks.
I've removed all occurences of sequence because I
Are you sure you measure correctly?
Did you include Perl startup time by accident?
Am 2012-02-20 16:09, schrieb Bill McCormick:
I'm just getting started using DBIx::Class and I am a little surprised
at performance (rather, lack there of).
Perhaps I've missed some key point, index or other
$dbh = DBI-connect(dbi:SQLite:$dbfile) or croak $DBI::errstr;
my $recipe_ary_ref = $dbh-selectall_arrayref($recipes_sql,{ Slice = {} });
foreach my $recipe ( @$recipe_ary_ref ) {
print qq/$recipe-{ID} $recipe-{NAME}\n/;
}
Thanks!!
Alexander Hartmaier wrote, On 2/20/2012 10:02 AM:
Are you
You can find an example in the many_to_many relationship bridge docs:
https://metacpan.org/module/DBIx::Class::Relationship#many_to_many
Am 2012-02-21 17:11, schrieb David Cantrell:
I have a bunch of classes set up as part of the ACL system for this 'ere
application what I'm writing. There is
Hi Marc,
are all your objects (tables, views, etc.) in the same Oracle schema?
If so you can tell Oracle to search this schema after connecting with
on_connect_do ALTER SESSION SET CURRENT_SCHEMA = $yourschemaname
The only place where this failed for me was private database links in that
Hi Sungsam,
the DBIx::Class mailing list is the wrong place to ask such questions.
As you can see in the docs HFH has its own mailing list:
https://metacpan.org/module/HTML::FormHandler#SUPPORT
Best regards, Alex
Am 2012-03-09 17:39, schrieb Sungsam Gong:
Hi,
I'm still hanging in there.
Two
The accessor is only used to create the object accessors, search has
always used the column names and not the accessor names.
Am 2012-04-02 00:34, schrieb Charlie Garrison:
Good morning,
On 30/03/12 at 2:49 PM -0400, Maddy, Noel nmad...@hfhs.org wrote:
Is there any way to provide consistent
Why has the Product table both an id and a productId column?
Aside from that it looks ok to me.
You might want to only specify the foreign column name in your
belongs_to rel to make the definition shorter and less error prone.
Best regards, Alex
Am 2012-04-20 15:02, schrieb Dmitry Bigunyak:
Hi
Hi Alex,
there is no such thing as inheritance in an RDBMS, so why whould an ORM
extend one table class (called resultsource/resultset in DBIC) to form
another table class?
To get you started it's usually the easiest to let dbicdump [1] create
all the DBIC classes and look at what it generated.
cannot use that solution in my
current projects.
I think that exists some free solution... seems to me i'm wrong with it.
15.06.2012, 15:53, Alexander Hartmaier alexander.hartma...@t-systems.at:
Hi Alex,
there is no such thing as inheritance in an RDBMS, so why whould an ORM
extend one
On 2012-08-16 12:13, Will Crawford wrote:
On 16 August 2012 08:42, Jan Grmela jan.grm...@imakers.cz wrote:
Hi Eugene,
I'm pretty sure this should help you:
http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/ResultSet.pm#cache
Not quite. What he's saying is, he wants $book-author to return
Take a look at the dbic Changelog, it's mentioned in there.
Cheers, Alex
On 2012-08-15 18:24, Bill Moseley wrote:
Pinging on this. Is this new behavior? I don't remember seeing these
warnings before -- and I am curious why the calling code needs to do this
instead of DBIC. Sorry if I'm
https://metacpan.org/source/FREW/DBIx-Class-0.08202_01/Changes
Best regards, Alex (abraxxa)
On 2012-10-15 16:17, fREW Schmidt wrote:
Hello All,
I've just shipped a dev rel that fixes the menagerie of fun issues we
got with the previous release and SQLite on various configurations.
Assuming
I've just released Search::Query::Dialect::DBIxClass to CPAN [1].
It uses Search::Query to parse a query string and transforms it into a hashref
than can be passed to $rs-search(_rs).
The Search::Query::Parser synopsis shows the valid operators and prefixes.
You can use it to enable users to
$obj-discard_changes;
because the database assigns the column value on insert but DBIC doesn't
fetch it from he db.
-Alex
On 2012-10-30 13:47, Robert Rothenberg wrote:
I have a Postgres table with a timestamp field that defaults to the
current time:
CREATE TABLE notes (
id
On 2012-10-30 14:02, Peter Rabbitson wrote:
On Tue, Oct 30, 2012 at 01:54:38PM +0100, Alexander Hartmaier wrote:
$obj-discard_changes;
because the database assigns the column value on insert but DBIC doesn't
fetch it from he db.
Please do not use/recommend discard_changes() for this use-case
On 2012-11-06 03:10, Bill Moseley wrote:
I've been looking over DBIx::Class::DeploymentHandler but not sure it's really
what I'm after.
We manage our schema DDL separately from our DBIC classes (it's not just DBIC
that accesses the database). That is, we don't generate the schema DDL from
On 2013-01-15 21:49, Peter Rabbitson wrote:
On Tue, Jan 15, 2013 at 05:12:12PM +0100, Alexander Hartmaier wrote:
On 2013-01-15 16:51, Peter Rabbitson wrote:
On Tue, Jan 15, 2013 at 10:09:19AM -0500, Jesse Sheidlower wrote:
On Tue, Jan 15, 2013 at 05:18:06AM +1100, Peter Rabbitson wrote
On 2013-01-16 13:20, Peter Rabbitson wrote:
On Wed, Jan 16, 2013 at 11:03:43AM +0100, Alexander Hartmaier wrote:
On 2013-01-15 21:49, Peter Rabbitson wrote:
On Tue, Jan 15, 2013 at 05:12:12PM +0100, Alexander Hartmaier wrote:
On 2013-01-15 16:51, Peter Rabbitson wrote:
On Tue, Jan 15, 2013
On 2013-02-08 19:59, Joe Carlson wrote:
Hey,
Thanks for DBIx::Class. I am liking it.
But I'm confused by inflation. I'm using 0.08120 - I know it's not the
latest, but it's what I can use - and Class::Schema::Loader::make_schema_at
to write the class modules.
Are columns with foreign
That's because your syntax is wrong:
-or { needs to be -or = [] as per SQL::Abstract docs.
and the LHS function too [1].
[1]
https://metacpan.org/module/RIBASUSHI/DBIx-Class-0.08210/lib/DBIx/Class/Manual/Cookbook.pod#Using-SQL-functions-on-the-left-hand-side-of-a-comparison
Best regards, Alex
On 2013-04-24 19:40, stephenmoy wrote:
Sorry Alex, I left out the '=' when I copied the query.
I tried the examples in the SQL::Abstract docs as well, but still in each
case, any multiple 'LOWER' functions gave an error.
I.E.: these work fine:
A) my @students = $schema-resultset(
Hi list,
after wasting a day with several approaches to the problem I'm asking here.
I want to update the column accept_datetime to DateTime-now when the
accept column is changed.
My current code has the problem of getting called by create as well and
thus overwriting the accept_datetime if it is
On 2013-05-28 17:44, Peter Rabbitson wrote:
On Tue, May 28, 2013 at 05:12:57PM +0200, Alexander Hartmaier wrote:
I didn't find a way to distinguish between a change and the initial
setting of the column value.
$result-has_column_loaded($col)
Cheers
GAH! I knew you have a solution at hand
One of my result classes has a rel ordered by a related column:
__PACKAGE__-has_many(
entries,
NAC::Model::DBIC::Table::Patch_Interface,
'fk_patch_request',
{ order_by = 'row_index' },
);
The following code used to sort by entries.row_index but doesn't any more:
my $request =
69 matches
Mail list logo