. for Log::Log4perl, it's
get_logger()), so there is no need to pass the logger around.
cheers
patrick
--
Patrick Meidl, Mag.
Senior Expert Software Engineering
IST - Institute of Science and Technology Austria
Am Campus 1
A-3400 Klosterneuburg, Austria
R I21.O3.201 (Building West, BT02)
T
+1
--
Patrick Meidl, Mag.
Senior Expert Software Engineering
IST - Institute of Science and Technology Austria
Am Campus 1
A-3400 Klosterneuburg, Austria
R I21.O3.201 (Building West, BT02)
T +43 2243 9000 1313
E pme...@ist.ac.at
W https://icp.ist.ac.at/search/users/pmeidl
Proposal A
--
Patrick Meidl, Mag.
Senior Expert Software Engineering
IST - Institute of Science and Technology Austria
Am Campus 1
A-3400 Klosterneuburg, Austria
R I21.EG.115 (Building West, BT01)
T +43 2243 9000 1313
E pme...@ist.ac.at
W https://icp.ist.ac.at/search/users/pmeidl
> >> discussed, people would still be able to use DBIx::Class::* modules in
> >> both namespaces.
> >>
> >
> > -1 on this proposal from me. I favor getting on with the existing proposal.
>
> -1 from me too. I think forking will harm both sides,
hat
> can evolve to fit what is needed at the time.
>
> +1
>
> Anything more is just detail which can be added as required by the
> community or core updating the governance in accordance with these rules.
+1
patrick
--
Patrick Meidl, Mag.
Senior Expert Software Engineering
te to file), are you using an utf8
filehandle? e.g.
use open ":encoding(utf8)";
or
binmode(OUT, ":utf8");
other than that, I found this page quite informative:
http://mysql.rjweb.org/doc.php/charcoll
HTH
patrick
--
Patrick Meidl, Mag.
Senior Expert Soft
amming language. so in that sense, a
comparison of ORMs in different languages (as requested by the OP) would
be interesting. my personal experience is that Java (with Hibernate as
the ORM) performs better there, but this is just my feeling and not
actual benchmark results.
cheers
patrick
--
properly designed your tables, and in
particular if you do proper normalization, the object instantiation is
a major overhead, which we could only overcome by using HashrefInflator
in some of our use cases.
patrick
--
Patrick Meidl, Mag.
Senior Expert Software Engineering
IST - Institute of Sc
{ require DBI; DBI::SQL_INTEGER() }
: undef
;
}
so the problem is that DBI is no longer required, so the sql type
subroutines are not imported.
die question is: which distro should at this require?
(DBIx::Class or HTML::FormHandler::Model::DBIC)
cheers
patrick
--
Patrick Meidl,
. this should do what you want:
my $rs1 = $c->model('weight::Mdata')->search($where,
{ %$attr, prefetch => 'mc' });
or alternatively:
push @{ $attr->{join} }, 'mt';
push @{ $attr->{join} }, 'mc';
$attr->{prefetch} = 'mc';
my $rs1 =
expected schema_version in my
application, but that actually sounds like a good idea
(ticket created ;-)
patrick
--
Patrick Meidl, Mag.
Senior Expert Software Engineering
IST - Institute of Science and Technology Austria
Am Campus 1
A-3400 Klosterneuburg, Austria
R 03.EG.003
T +43 2243 9000 1
I suggested is
much more powerful because you can use it in conditions and arguments as
if it were a real column name.
patrick
--
Patrick Meidl patr...@pantheon.at
Vienna, Austria .. http://gplus.to/pmeidl
---------
not sure though about your other intentions with the dynamic columns
class.
patrick
--
Patrick Meidl patr...@pantheon.at
Vienna, Austria .. http://gplus.to/pmeidl
__
d:
http://stackoverflow.com/questions/338156/table-naming-dilemma-singular-vs-plural-names
I always use singular, since this is easiest to handle for ORMs (as your
question shows, plurals can cause confusion).
HTH
patrick
--
Patrick Meidl pat
Row.pm#is_changed
HTH
patrick
--
Patrick Meidl patr...@pantheon.at
Vienna, Austria .. http://gplus.to/pmeidl
___
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbi
gt; in the Result classes below the checksum created by Loader?
exactly.
patrick
--
Patrick Meidl patr...@pantheon.at
Vienna, Austria .. http://gplus.to/pmeidl
___
List: http://lists.scsys.co.uk/cgi-bin/
o.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
HTH
patrick
--
Patrick Meidl patr...@panthe
On Fri, Jul 13 2012, Dave Howorth wrote:
> Patrick Meidl wrote:
>
> > there are two reasons why you want to model the relationship city ->
> > state -> country in such a rigid (and maybe simplified) way:
> >
> > first, it helps you maintain data integrity. a
>get_territory_from_code($code);
$code = uc($code);
$country_rs->create(
{
iso => $code,
name_en => $name_en,
}
);
}
--8<-----------
anyway, all this is just my 2p, I'm no
On Thu, Jul 12 2012, fREW Schmidt wrote:
> On Thu, Jul 12, 2012 at 2:48 AM, Patrick Meidl wrote:
>
> > first, to get the cities associated to the store, use the many_to_many
> > relationship you defined; if you have such a relationship, you usually
> > neve
and treat this as
> free-form data.
I agree, due to such maintenance nightmares I fell back to this approach
myself before. Normalisation is great, as long as you have a reliable
data source :)
patrick
--
Patrick Meidl patr...@pantheon.at
Vienna, Austria
On Thu, Jul 12 2012, Frank Schwach wrote:
nice to see a "colleague" from one of my former employers on this thread
;-)
> On 12/07/12 09:29, Patrick Meidl wrote:
> >On Thu, Jul 12 2012, Robyn Jonahs wrote:
> >
> >>The cities, states and country relationships
uot; . $city->city . "\n";
print "State: " . $city->state->name . "\n";
print "Country: " . $city->state->country->name . "\n";
}
you could also use the proxy attribute on your belongs_to relations to
shortcut these calls to so
= $self->store;
my @cities = $self->cities;
foreach my $city (@cities) {
$result .= sprintf(' | %s, %s %s', $city->city,
$self->states->abb, $self->countries->abb);
}
return $result;
}
--8<
n: in your User Result class, you have a many_to_many called
'roles' which returns the Role's associated with the user (joining via
the user_role table), then you can call the accessors on the Role object
to display the data you need.
HTH
patrick
--
Patrick Meidl ..
data = $sr->next) {
# call accessors on your Accountv object
...
}
HTH
patrick
--
Patrick Meidl patr...@pantheon.at
Vienna, Austria .. http://gplus.to/pmeidl
___
List: http://lists.scsys.co.u
On Fri, Jul 06 2012, Patrick Meidl wrote:
> On Fri, Jul 06 2012, Kenneth S Mclane wrote:
>
> > > Subject:
> > >
> > > Re: [Dbix-class] Problem getting data from resultset
> > >
> > >
> > > foreach my $method (split(/\./, $f
On Thu, Jul 05 2012, Patrick Meidl wrote:
> On Thu, Jul 05 2012, Kenneth S Mclane wrote:
>
> > my $wb =
> > Spreadsheet::WriteExcel->new('/opt/catalyst/dbms/lib/dbms/output/output.xls');
> > my $ws = $wb->add_worksheet('O
t never ends. I comment it out and
> it acts like it is hung, my browser just says "Waiting for local Host".
if you posted your code it would be easier to help debug it...
patrick
--
Patrick Meidl patr...@pantheon.at
Vienna, Austria .
;perldoc perlfunc'). as I mentioned
before, you should use can() for this. so something like this should put
you on the right track:
foreach my $method (split(/\./, $field)) {
if (defined($val) and ref($val) and $val->can($method)) {
$val = $val->$method;
;$method;
> > }
> > $ws->write($row, $col, $val);
> >
> > to make your code more robust, you should add some sanity checking, like
> >
> > if ($val->can($method)) { ... }
> >
> > HTH
> >
> > patrick
> >
> > --
>
it to. you would
have to do something like
my $val = $data;
foreach my $method (split(/\./, $field)) {
$val = $val->$method;
}
$ws->write($row, $col, $val);
to make your code more robust, you should add some sanity checking, like
if ($val->can($method)) { ... }
HTH
patrick
$col++;
> }
> $row++;
> $col=0;
> }
your code will only work for fields in the main table of your resultset,
but will break for relations. for example,
$data->department.department_code is not a valid accessor. you will h
uot;reset" the column selection but to all
> columns.
[...]
> What is the correct behavior, and how can I achieve the the old behavior of
> "columns => undef"?
just a shot in the dark, but have you tried calling $rs->clear_cache
before doing the second search?
pat
another framework does, even if you think the other design is nicer.
HTH
patrick
--
Patrick Meidl patr...@pantheon.at
Vienna, Austria .. http://gplus.to/pmeidl
___
List: http://lists.scsys
framework or plain cgi, too) which does input validation
with customisable error messages.
HTH
patrick
--
Patrick Meidl patr...@pantheon.at
Vienna, Austria .. http://gplus.to/pmeidl
___
List: http://li
tps://metacpan.org/module/DBIx::Class::Relationship
https://metacpan.org/module/DBIx::Class::ResultSet
as somebody else already pointed out, it can be more difficult to get
started with DBIc when you try to translate literal SQL queries into
DBIx::Class queries, rather than thinki
e->connect_info->{dsn};
HTH
patrick
--
Patrick Meidl +43 1 9688226 (home)
Pazmanitengasse 4/10 . +43 680 2072780 (mobile)
1020 Wien patr...@pantheon.at
Austria
sing Trycatch to handle them:
https://metacpan.org/module/TryCatch
this is a nice implementation of java-style exception semantics in perl.
HTH
patrick
--
Patrick Meidl +43 1 9688226 (home)
Pazmanitengasse 4/10 . +43 680 2072780 (m
'New title' });
I get an exception.
the pod at
https://metacpan.org/module/DBIx::Class::Relationship::Base#attributes
suggests to me that this should work. so, is this expected behaviour, or
a known limitation, or bug, or am I doing something wrong?
cheers
patrick
--
Patrick M
40 matches
Mail list logo