Re: [Dbix-class] Detecting connection errors

2015-10-14 Thread David Ihnen
---end--->8--- > > Thanks, > > -- > Alberto > > > ___ > List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class > IRC: irc.perl.org#dbix-class > SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-C

Re: [Dbix-class] How to manage customer-specific / user-defined attributes?

2015-09-27 Thread David Ihnen
ation approach with > single values attributes. > > Best regards, > Alex > > ___ > List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class > IRC: irc.perl.org#dbix-class > SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ > Searc

Re: [Dbix-class] has_many LEFT JOIN with parameter

2011-05-06 Thread David Ihnen
___ List: http://lists.scsys.co.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 -- David Ihnen Voice contact (562) 743

Re: [Dbix-class] Relationship question/database structure

2011-01-10 Thread David Ihnen
-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 -- David Ihnen Voice contact (562) 743-1807 ___ List: http

Re: [Dbix-class] Relationship question/database structure

2011-01-10 Thread David Ihnen
is an abbreviation for the name of the table the note is related to, and the 'TableId' is the record within that table. So, it is in fact a multi-column join between the note table and several other tables, each with their own 'TableName'. Steve On 1/10/2011 1:07 PM, David Ihnen wrote

Re: [Dbix-class] Relationship question/database structure

2011-01-10 Thread David Ihnen
approach? On 1/10/2011 1:34 PM, David Ihnen wrote: You're not thinking specifically enough. The column which has the ID in it is being used to store disparate types of information - a transaction note identifier is a DIFFERENT type than a customer service event identifier - but they're

Re: [Dbix-class] Relationship question/database structure

2011-01-10 Thread David Ihnen
Agreed, You are a better expresser than I, apologies for clutzing ther ideas. And I do like my julienned fries. David On Mon, Jan 10, 2011 at 2:10 PM, Rob Kinyon rob.kin...@gmail.com wrote: On Mon, Jan 10, 2011 at 13:54, David Ihnen davidih...@gmail.com wrote: Yes. That was what i

Re: [Dbix-class] Moose

2010-07-18 Thread David Ihnen
On Sun, Jul 18, 2010 at 7:40 AM, Leandro Hermida soft...@leandrohermida.com wrote: Hi t0m, On Sun, Jul 18, 2010 at 6:22 AM, Tomas Doran bobtf...@bobtfish.netwrote: On 11 Jul 2010, at 14:48, Leandro Hermida wrote: I had a look at KiokuDB, its a very nice project and suitable for certain

Re: [Dbix-class] Multiple ands in where clause

2010-05-28 Thread David Ihnen
Perchane did you try something like this: $rs = $schema-resultset('IncOpcode')-search( { desc = { -like = [ map { '%'.$_.'%' } @TERMS ] }    } ); David On Fri, May 28, 2010 at 12:57 PM, Dennis Daupert ddaup...@gmail.com wrote: I need to '-and' a varying number of variables in a where

Re: [Dbix-class] Shortcut to perform lookups

2009-07-06 Thread David Ihnen
Dan Horne wrote: On 7/07/2009, at 12:43 PM, David Ihnen wrote: Dan Horne wrote: Say I have a table called customer which links to a parent table called status. I wonder if there is a shortcut so that I don't need to figure out the parent id in advance if I know the unique name. my

Re: [Dbix-class] Shortcut to perform lookups

2009-07-06 Thread David Ihnen
Oye, at least when you're coding you don't make silly ommissions... like not doing create_related. my ($self, $status_obj, $phase_obj) = @_; $self-txn_do( sub { $self-create_related('process', { status = $status_obj, phase = $phase_obj }) } ); }

Re: [Dbix-class] PATCH: Support for arbitrary SQL in relationship definition

2009-06-30 Thread David Ihnen
Peter Rabbitson wrote: David Ihnen wrote: Ivan Fomichev wrote: Hello, great module. Instead of arguing if it is a useful patch or not and if it should be applied or there are weird workarounds easily available, just make your own DBIx::Class component and release it on CPAN. Who need

Re: [Dbix-class] PATCH: Support for arbitrary SQL in relationship definition

2009-06-30 Thread David Ihnen
Rob Kinyon wrote: Now, if someone can provide a solid use-case, then I'll be onboard. But, adding features for the sake of adding features is how you end up with a crappy API. Rob Lets see if I can argue the use case. I tripped over this limitation and I *think* it was when I was doing this

Re: [Dbix-class] PATCH: Support for arbitrary SQL in relationship

2009-06-29 Thread David Ihnen
Rob Kinyon wrote: On Mon, Jun 29, 2009 at 10:13, Peter Rabbitsonrabbit+d...@rabbit.us wrote: A classical use-case is right side condition on a left-join. There is no way to emulate those appropriately with WHERE - the condition has to reside in the join spec itself: i.e. you need to get ALL

Re: [Dbix-class] PATCH: Support for arbitrary SQL in relationship definition

2009-06-29 Thread David Ihnen
Ivan Fomichev wrote: Hello, great module. Instead of arguing if it is a useful patch or not and if it should be applied or there are weird workarounds easily available, just make your own DBIx::Class component and release it on CPAN. Who need will load this component. Good luck. Ivan. Can

Re: [Dbix-class] Resultset relation accessors

2009-06-08 Thread David Ihnen
Matt S Trout wrote: On Tue, May 26, 2009 at 01:49:05PM -0700, David Ihnen wrote: Sometimes I think i'm missing something obvious. In my application, for instance, a holiday can be assigned to a group. A group has many donors A donor might have many scheduled days A scheduled day

[Dbix-class] Resultset relation accessors

2009-05-26 Thread David Ihnen
Sometimes I think i'm missing something obvious. In my application, for instance, a holiday can be assigned to a group. A group has many donors A donor might have many scheduled days A scheduled day is associated with a particular schedule In this spot in my application, the operation is

[Dbix-class] Null foreign keys and the reload_from_storage error when its not wanted

2009-05-21 Thread David Ihnen
Is this appropriate behavior or a bug? Consider this code here. It is part of our application's database test script. Its purpose is to hit every rel defined in the database so that we can get an early warning on any class configuration mismatching the state of the database. # get all the

Re: [Dbix-class] 0.08103 - subtle testing fail

2009-05-20 Thread David Ihnen
Peter Rabbitson wrote: David Ihnen wrote: fREW Schmidt wrote: On Mon, May 18, 2009 at 5:16 PM, Peter Rabbitson rabbit+d...@rabbit.us mailto:rabbit%2bd...@rabbit.us wrote: Greetings, The next release of DBIC will have a number of exciting improvements, among them proper

Re: [Dbix-class] 0.08103 - subtle testing fail

2009-05-19 Thread David Ihnen
fREW Schmidt wrote: On Mon, May 18, 2009 at 5:16 PM, Peter Rabbitson rabbit+d...@rabbit.us mailto:rabbit%2bd...@rabbit.us wrote: Greetings, The next release of DBIC will have a number of exciting improvements, among them proper -count -update and -delete of any resultset,

Re: [Dbix-class] 0.08103 - call for testers!

2009-05-18 Thread David Ihnen
Peter Rabbitson wrote: Greetings, The next release of DBIC will have a number of exciting improvements, among them proper -count -update and -delete of any resultset, regardless of it's complexity (join, group_by, paging, etc.) While all of these improvements are logical extensions of the

Re: [Dbix-class] Problem with populate() and commits?

2009-05-15 Thread David Ihnen
Louis Erickson wrote: On Thu, 14 May 2009, Chris Cole wrote: snip Why does it work fine when I have Autocommit 'on', but get the following error with Autocommit 'off': I'm surprised no one else has replied. I must have missed the message. This bit me too when I first started

Re: [Dbix-class] New user with JOIN problem

2009-05-12 Thread David Ihnen
Chris Cole wrote: Ultimately, the SQL code I want to replicate is: SELECT miRNA_id, sum(abundance) as sum FROM mirbase_hairpin_match, seq_data WHERE query_id = id AND query_id LIKE 'mmuD%' GROUP BY miRNA_id I've tried breaking it down to a simpler SQL for testing: SELECT query_id, miRNA_id,

Re: [Dbix-class] DBIx::Class 0.08100 released to CPAN

2009-04-22 Thread David Ihnen
Peter Rabbitson wrote: David Ihnen wrote: Matt S Trout wrote: On Tue, Apr 21, 2009 at 10:59:48AM -0700, David Ihnen wrote: Which is why: -create_related('ivr_holiday', { holiday = date, description = $description }); is called. but does not create

Re: [Dbix-class] Insert or Update (was ANNOUNCE: 0.08099_08)

2009-04-20 Thread David Ihnen
Peter Corlett wrote: On 19 Apr 2009, at 11:14, Matt S Trout wrote: [...] And the patch didn't come with tests, so I assumed he didn't *want* it to be applied ... It was more a prompt for somebody with better inside knowledge of DBIx::Class to take the idea and run with it or suggest a

Re: [Dbix-class] DBIx::Class 0.08100 released to CPAN

2009-04-20 Thread David Ihnen
BUT - if we *do* put the hash entry in for the relationship tying column (donor_id in this case) - but leave its value undefined - the error does not occur. What do you make of that? David Ihnen Matt S Trout wrote: After possibly the longest and most irritating development cycle in DBIC's

Re: [Dbix-class] Newbie question

2009-03-16 Thread David Ihnen
ivan wrote: I wish to realise SQL in DBIx syntax: select * from table1 left join ( select * from table2 where date = 'mydate' ) as F ON ( table1.id = F.table1_id ); Is it possible ? package DB::Schema::table1; __PACKAGE__-load_components(qw/core/); __PACKAGE__-table('table1');

Re: [Dbix-class] Set a resultset_class for a result_class from within a component loaded by the result_class

2009-03-05 Thread David Ihnen
Rob Kinyon wrote: On Thu, Mar 5, 2009 at 12:07, David Ihnen dav...@norchemlab.com wrote: Nothing is actually a plugin that impliments the 'Nothing' design pattern - that is - instead of returning null when referencing a row in an empty resultset (particularly -single and -first

[Dbix-class] Fun with auto-restricted result sets

2009-02-18 Thread David Ihnen
So in the wake of fREW showing a modification of the classes to allow the modification of the delete, I utilized a corrollary concept... restricting a result set automatically/transparently, as you would in case of that delete - not normally showing the deleted rows. In my case, my alerts

Re: [Dbix-class] soft deletion

2009-02-17 Thread David Ihnen
I wrote a blog post on the specifics of my method. http://blog.afoolishmanifesto.com/archives/274. The only things that are missing are a) configurability and b) a way to find deleted rows. The first is just a matter of me reading the source code of more Components, the second seems

Re: [Dbix-class] Weird search issue

2009-02-12 Thread David Ihnen
Looks like an encoding problem, fREW. You might notice its not a dot *between* - its a dot *after* each letter. The data is being sent in as something like 16 bit unicode, and is being serialized out without taking that into account. I wish I knew the solution, but I hope that provides a

Re: [Dbix-class] Get a list of parent objects based on child object properties (possible n00bish question)

2009-02-04 Thread David Ihnen
Heiko Gruner wrote: Hello, i tried to hardcode values into a table relationship like below. But i just received just errors like undef error - Invalid rel cond val That sucks, eh Heiko? Yes, what I was saying below is I know what you mean and this is how I want it to work, but it does not

Re: [Dbix-class] Get a list of parent objects based on child object properties (possible n00bish question)

2009-02-03 Thread David Ihnen
. I hope we can figure out how to do complex join relations, that would be awesome. Helpfully, David Ihnen Programmer Norchem Laboratories http://www.norchemlab.com/ ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC